summaryrefslogtreecommitdiffstats
path: root/Tests/TryCompile
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-09-18 13:49:51 (GMT)
committerBrad King <brad.king@kitware.com>2009-09-18 13:49:51 (GMT)
commit997ae66cbb6aa0e8039071a14e2cb0d96d3ecf3d (patch)
treeabd968b3a182e87a5b9f996a2116215fbcc84ada /Tests/TryCompile
parent83957d9e0defcff8ae497078a47f77f183674f16 (diff)
downloadCMake-997ae66cbb6aa0e8039071a14e2cb0d96d3ecf3d.zip
CMake-997ae66cbb6aa0e8039071a14e2cb0d96d3ecf3d.tar.gz
CMake-997ae66cbb6aa0e8039071a14e2cb0d96d3ecf3d.tar.bz2
Fix CHECK_(C|CXX)_COMPILER_FLAG macro test
The flag "-_this_is_not_a_flag_" was not rejected by GCC 4.0 on older Mac OS X. We now use "---_this_is_not_a_flag_" instead, which will hopefully be rejected by all compilers.
Diffstat (limited to 'Tests/TryCompile')
-rw-r--r--Tests/TryCompile/CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/Tests/TryCompile/CMakeLists.txt b/Tests/TryCompile/CMakeLists.txt
index ea571a2..75adb99 100644
--- a/Tests/TryCompile/CMakeLists.txt
+++ b/Tests/TryCompile/CMakeLists.txt
@@ -202,10 +202,10 @@ TEST_ASSERT(CXX_RUN_SHOULD_WORK "CHECK_CXX_SOURCE_RUNS() failed")
UNSET(C_BOGUS_FLAG CACHE)
INCLUDE(CheckCCompilerFlag)
-CHECK_C_COMPILER_FLAG(-_this_is_not_a_flag_ C_BOGUS_FLAG)
+CHECK_C_COMPILER_FLAG(---_this_is_not_a_flag_ C_BOGUS_FLAG)
TEST_FAIL(C_BOGUS_FLAG "CHECK_C_COMPILER_FLAG() succeeded, but should have failed")
UNSET(CXX_BOGUS_FLAG CACHE)
INCLUDE(CheckCXXCompilerFlag)
-CHECK_CXX_COMPILER_FLAG(-_this_is_not_a_flag_ CXX_BOGUS_FLAG)
+CHECK_CXX_COMPILER_FLAG(---_this_is_not_a_flag_ CXX_BOGUS_FLAG)
TEST_FAIL(CXX_BOGUS_FLAG "CHECK_CXX_COMPILER_FLAG() succeeded, but should have failed")