BUG: Check if the compiler is gnu. If it is, do not do special platform tests. Fixes Bug #1215 - bootstrap uses native flags with gnu compiler on OSF
This commit is contained in:
parent
cbab381bda
commit
d186bbd719
25
bootstrap
25
bootstrap
@ -511,6 +511,30 @@ fi
|
||||
|
||||
# Test C++ compiler features
|
||||
|
||||
# Are we GCC?
|
||||
|
||||
TMPFILE=`cmake_tmp_file`
|
||||
cat > ${TMPFILE}.cxx <<EOF
|
||||
#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
|
||||
#include <iostream>
|
||||
int main() { std::cout << "This is GNU" << std::endl; return 0;}
|
||||
#endif
|
||||
EOF
|
||||
cmake_cxx_compiler_is_gnu=0
|
||||
if cmake_try_run "${cmake_cxx_compiler}" \
|
||||
"${cmake_cxx_flags}" "${TMPFILE}.cxx" >> cmake_bootstrap.log 2>&1; then
|
||||
cmake_cxx_compiler_is_gnu=1
|
||||
fi
|
||||
if [ "x${cmake_cxx_compiler_is_gnu}" = "x1" ]; then
|
||||
echo "${cmake_cxx_compiler} is GNU compiler"
|
||||
else
|
||||
echo "${cmake_cxx_compiler} is not GNU compiler"
|
||||
fi
|
||||
rm -f "${TMPFILE}.cxx"
|
||||
|
||||
if [ "x${cmake_cxx_compiler_is_gnu}" != "x1" ]; then
|
||||
# Check for non-GNU compiler flags
|
||||
|
||||
# If we are on IRIX, check for -LANG:std
|
||||
cmake_test_flags="-LANG:std"
|
||||
if [ "x${cmake_system}" = "xIRIX64" ]; then
|
||||
@ -614,6 +638,7 @@ EOF
|
||||
rm -f "${TMPFILE}.c"
|
||||
fi
|
||||
cmake_test_flags=
|
||||
fi
|
||||
|
||||
# Test for kwsys features
|
||||
KWSYS_NAME_IS_KWSYS=0
|
||||
|
Loading…
x
Reference in New Issue
Block a user