@@ -650,6 +650,8 @@ GTEST_HOME
650
650
GMOCK_HOME
651
651
INCLUDE_CPPUTEST_EXT_FALSE
652
652
INCLUDE_CPPUTEST_EXT_TRUE
653
+ TEST_COMPILER_IS_CLANG_FALSE
654
+ TEST_COMPILER_IS_CLANG_TRUE
653
655
CPPUTEST_HAS_LCOV
654
656
CPPUTEST_HAS_CLANG
655
657
CPPUTEST_HAS_GCC
@@ -6211,32 +6213,44 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
6211
6213
ac_compiler_gnu=$ac_cv_c_compiler_gnu
6212
6214
6213
6215
6214
- #### Check whether some linker options are supported... ?
6215
-
6216
- LDFLAGS=
6217
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether LD supports -Qunused-arguments" >&5
6218
- $as_echo_n "checking whether LD supports -Qunused-arguments... " >&6; }
6219
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6220
- /* end confdefs.h. */
6216
+ ##### Linker checking.
6217
+ #
6218
+ # TBD!
6219
+ # Things that need to be fixed!
6220
+ #
6221
+ # The below code is checking for the -Qunused-arguments which is a linker flag. However, it says gcc supports it, while in fact, it doesn't.
6222
+ # As a workaround, we'll just check whether it is clang hardcoded, this is not in the automake spirit and will need to be fixed.
6223
+ #
6224
+ # LDFLAGS=
6225
+ # AC_MSG_CHECKING([whether LD supports -Qunused-arguments])
6226
+ # AC_LINK_IFELSE([AC_LANG_PROGRAM([])], [AC_MSG_RESULT([yes]); CPPUTEST_NO_UNUSED_ARGUMENT_WARNING+=" -Qunused-arguments" ], [AC_MSG_RESULT([no])])
6227
+ # LDFLAGS="$saved_ldflags"
6228
+
6229
+ #if [ -z "`$CXX --version | grep LLVM`" ]
6230
+ #then
6231
+ # AC_MSG_RESULT([no])
6232
+ #else
6233
+ # AC_MSG_RESULT([yes])
6234
+ #fi
6221
6235
6222
- int
6223
- main ()
6224
- {
6236
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CXXLD supports -Qunused-arguments linker option" >&5
6237
+ $as_echo_n "checking whether CXXLD supports -Qunused-arguments linker option... " >&6; }
6238
+ OUTPUT_WHEN_CLANG_COMPILER=`${CXX} --version | grep clang`
6239
+ if ! test -z "$OUTPUT_WHEN_CLANG_COMPILER"; then
6240
+ TEST_COMPILER_IS_CLANG_TRUE=
6241
+ TEST_COMPILER_IS_CLANG_FALSE='#'
6242
+ else
6243
+ TEST_COMPILER_IS_CLANG_TRUE='#'
6244
+ TEST_COMPILER_IS_CLANG_FALSE=
6245
+ fi
6225
6246
6226
- ;
6227
- return 0;
6228
- }
6229
- _ACEOF
6230
- if ac_fn_c_try_link "$LINENO"; then :
6247
+ if ! test -z "$OUTPUT_WHEN_CLANG_COMPILER"; then
6231
6248
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6232
6249
$as_echo "yes" >&6; }; CPPUTEST_NO_UNUSED_ARGUMENT_WARNING+=" -Qunused-arguments"
6233
6250
else
6234
6251
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6235
- $as_echo "no" >&6; }
6252
+ $as_echo "no" >&6; }; CPPUTEST_NO_UNUSED_ARGUMENT_WARNING+=" "
6236
6253
fi
6237
- rm -f core conftest.err conftest.$ac_objext \
6238
- conftest$ac_exeext conftest.$ac_ext
6239
- LDFLAGS="$saved_ldflags"
6240
6254
6241
6255
# Different features
6242
6256
# Check whether --enable-std-c was given.
@@ -16890,6 +16904,10 @@ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
16890
16904
as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
16891
16905
Usually this means the macro was only invoked conditionally." "$LINENO" 5
16892
16906
fi
16907
+ if test -z "${TEST_COMPILER_IS_CLANG_TRUE}" && test -z "${TEST_COMPILER_IS_CLANG_FALSE}"; then
16908
+ as_fn_error $? "conditional \"TEST_COMPILER_IS_CLANG\" was never defined.
16909
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
16910
+ fi
16893
16911
if test -z "${INCLUDE_CPPUTEST_EXT_TRUE}" && test -z "${INCLUDE_CPPUTEST_EXT_FALSE}"; then
16894
16912
as_fn_error $? "conditional \"INCLUDE_CPPUTEST_EXT\" was never defined.
16895
16913
Usually this means the macro was only invoked conditionally." "$LINENO" 5
0 commit comments