[Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.17 1.18

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Sep 18 09:49:55 EDT 2009


Update of /cvsroot/CMake/CMake/Tests/TryCompile
In directory public:/mounts/ram/cvs-serv8323/Tests/TryCompile

Modified Files:
	CMakeLists.txt 
Log Message:
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.


Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/TryCompile/CMakeLists.txt,v
retrieving revision 1.17
retrieving revision 1.18
diff -C 2 -d -r1.17 -r1.18
*** CMakeLists.txt	17 Sep 2009 19:33:12 -0000	1.17
--- CMakeLists.txt	18 Sep 2009 13:49:51 -0000	1.18
***************
*** 203,211 ****
  UNSET(C_BOGUS_FLAG CACHE)
  INCLUDE(CheckCCompilerFlag)
! 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)
  TEST_FAIL(CXX_BOGUS_FLAG "CHECK_CXX_COMPILER_FLAG() succeeded, but should have failed")
--- 203,211 ----
  UNSET(C_BOGUS_FLAG CACHE)
  INCLUDE(CheckCCompilerFlag)
! 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)
  TEST_FAIL(CXX_BOGUS_FLAG "CHECK_CXX_COMPILER_FLAG() succeeded, but should have failed")



More information about the Cmake-commits mailing list