diff options
author | Brad King <brad.king@kitware.com> | 2009-07-08 11:41:48 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-07-08 11:41:48 -0400 |
commit | d1aa17a7b0f3b81367d4eb10e2404a5214f6890a (patch) | |
tree | 9402693c7ff8ea4f7c611fb59d69d5c5a953793a | |
parent | a30a41e5ca07a278dbea87fd7d6085e1f6bf9714 (diff) | |
download | cmake-d1aa17a7b0f3b81367d4eb10e2404a5214f6890a.tar.gz |
ENH: Remove CMAKE_ANSI_CFLAGS from tests
As of CMake 2.6 this variable is not defined, and the ANSI flags for the
HP compiler are simply hard-coded in the default C flags.
21 files changed, 0 insertions, 79 deletions
diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt index 5f9b18c3e0..d73bbfc0e5 100644 --- a/Tests/Complex/CMakeLists.txt +++ b/Tests/Complex/CMakeLists.txt @@ -78,13 +78,6 @@ IF(NOT 2.4 EQUAL 2.4) MESSAGE(FATAL_ERROR "Failed: NOT 2.4 EQUAL 2.4") ENDIF(NOT 2.4 EQUAL 2.4) -# -# Use the ansi CXX compile flag for building cmake -# -IF (CMAKE_ANSI_CXXFLAGS) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}") -ENDIF (CMAKE_ANSI_CXXFLAGS) - IF(CMAKE_SYSTEM MATCHES "OSF1-V.*") IF(NOT CMAKE_COMPILER_IS_GNUCXX) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ") diff --git a/Tests/Complex/Executable/CMakeLists.txt b/Tests/Complex/Executable/CMakeLists.txt index 6f47838c73..9e86320823 100644 --- a/Tests/Complex/Executable/CMakeLists.txt +++ b/Tests/Complex/Executable/CMakeLists.txt @@ -4,7 +4,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 1.3) # SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTEST_CXX_FLAGS") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DTEST_C_FLAGS") -SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}") IF(COMPLEX_TEST_CMAKELIB) # Link to CMake lib diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt index 5f9b18c3e0..d73bbfc0e5 100644 --- a/Tests/ComplexOneConfig/CMakeLists.txt +++ b/Tests/ComplexOneConfig/CMakeLists.txt @@ -78,13 +78,6 @@ IF(NOT 2.4 EQUAL 2.4) MESSAGE(FATAL_ERROR "Failed: NOT 2.4 EQUAL 2.4") ENDIF(NOT 2.4 EQUAL 2.4) -# -# Use the ansi CXX compile flag for building cmake -# -IF (CMAKE_ANSI_CXXFLAGS) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}") -ENDIF (CMAKE_ANSI_CXXFLAGS) - IF(CMAKE_SYSTEM MATCHES "OSF1-V.*") IF(NOT CMAKE_COMPILER_IS_GNUCXX) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ") diff --git a/Tests/ComplexOneConfig/Executable/CMakeLists.txt b/Tests/ComplexOneConfig/Executable/CMakeLists.txt index 6f47838c73..9e86320823 100644 --- a/Tests/ComplexOneConfig/Executable/CMakeLists.txt +++ b/Tests/ComplexOneConfig/Executable/CMakeLists.txt @@ -4,7 +4,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 1.3) # SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTEST_CXX_FLAGS") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DTEST_C_FLAGS") -SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}") IF(COMPLEX_TEST_CMAKELIB) # Link to CMake lib diff --git a/Tests/ComplexRelativePaths/CMakeLists.txt b/Tests/ComplexRelativePaths/CMakeLists.txt index 5f9b18c3e0..d73bbfc0e5 100644 --- a/Tests/ComplexRelativePaths/CMakeLists.txt +++ b/Tests/ComplexRelativePaths/CMakeLists.txt @@ -78,13 +78,6 @@ IF(NOT 2.4 EQUAL 2.4) MESSAGE(FATAL_ERROR "Failed: NOT 2.4 EQUAL 2.4") ENDIF(NOT 2.4 EQUAL 2.4) -# -# Use the ansi CXX compile flag for building cmake -# -IF (CMAKE_ANSI_CXXFLAGS) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}") -ENDIF (CMAKE_ANSI_CXXFLAGS) - IF(CMAKE_SYSTEM MATCHES "OSF1-V.*") IF(NOT CMAKE_COMPILER_IS_GNUCXX) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ") diff --git a/Tests/ComplexRelativePaths/Executable/CMakeLists.txt b/Tests/ComplexRelativePaths/Executable/CMakeLists.txt index 6f47838c73..9e86320823 100644 --- a/Tests/ComplexRelativePaths/Executable/CMakeLists.txt +++ b/Tests/ComplexRelativePaths/Executable/CMakeLists.txt @@ -4,7 +4,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 1.3) # SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTEST_CXX_FLAGS") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DTEST_C_FLAGS") -SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}") IF(COMPLEX_TEST_CMAKELIB) # Link to CMake lib diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt index ffe05237eb..f76bbd57b5 100644 --- a/Tests/CustomCommand/CMakeLists.txt +++ b/Tests/CustomCommand/CMakeLists.txt @@ -354,7 +354,6 @@ FOREACH(arg ${CHECK_ARGS} "") "${EXPECTED_ARGUMENTS} \"${ARG}\", ") ENDFOREACH(arg) -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}") CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/check_command_line.c.in ${CMAKE_CURRENT_BINARY_DIR}/check_command_line.c @ONLY IMMEDIATE) diff --git a/Tests/Dependency/CMakeLists.txt b/Tests/Dependency/CMakeLists.txt index d700374b04..86e128f58e 100644 --- a/Tests/Dependency/CMakeLists.txt +++ b/Tests/Dependency/CMakeLists.txt @@ -1,8 +1,6 @@ cmake_minimum_required (VERSION 2.6) PROJECT( Dependency ) -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}") - # to test directories with only one character One was changed to 1 # There is one executable that depends on eight libraries. The # system has the following dependency graph: diff --git a/Tests/Dependency/Case4/CMakeLists.txt b/Tests/Dependency/Case4/CMakeLists.txt index 87ab50722e..a71049da39 100644 --- a/Tests/Dependency/Case4/CMakeLists.txt +++ b/Tests/Dependency/Case4/CMakeLists.txt @@ -1,9 +1,5 @@ project(CASE4 C) -IF(CMAKE_ANSI_CFLAGS) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}") -ENDIF(CMAKE_ANSI_CFLAGS) - # This is not really a circular dependency. "case4Bar" refers to a # third-party library that happens to match the executable name, which # is okay when the executable is not a linkable target (ENABLE_EXPORTS diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index ebfe8d3356..4de3f64c50 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -1,11 +1,6 @@ cmake_minimum_required (VERSION 2.6) project(Export C) -# We need ansi C support. -if(CMAKE_ANSI_CFLAGS) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}") -endif(CMAKE_ANSI_CFLAGS) - # Pretend that RelWithDebInfo should link to debug libraries to test # the DEBUG_CONFIGURATIONS property. set_property(GLOBAL PROPERTY DEBUG_CONFIGURATIONS Debug RelWithDebInfo) diff --git a/Tests/ExportImport/Import/CMakeLists.txt b/Tests/ExportImport/Import/CMakeLists.txt index 00bf3063d0..eb3a9545dd 100644 --- a/Tests/ExportImport/Import/CMakeLists.txt +++ b/Tests/ExportImport/Import/CMakeLists.txt @@ -1,11 +1,6 @@ cmake_minimum_required (VERSION 2.6) project(Import C) -# We need ansi C support. -if(CMAKE_ANSI_CFLAGS) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}") -endif(CMAKE_ANSI_CFLAGS) - # Import everything in a subdirectory. add_subdirectory(A) diff --git a/Tests/FunctionTest/CMakeLists.txt b/Tests/FunctionTest/CMakeLists.txt index 3a25bb4106..2f62c27afd 100644 --- a/Tests/FunctionTest/CMakeLists.txt +++ b/Tests/FunctionTest/CMakeLists.txt @@ -2,8 +2,6 @@ cmake_minimum_required (VERSION 2.6) PROJECT (FunctionTest) -SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}") - FUNCTION(FAILED testname) MESSAGE(SEND_ERROR "${testname} failed ${ARGN}") ENDFUNCTION(FAILED) diff --git a/Tests/LoadCommand/CMakeCommands/CMakeLists.txt b/Tests/LoadCommand/CMakeCommands/CMakeLists.txt index 4ba21d2743..953d05c999 100644 --- a/Tests/LoadCommand/CMakeCommands/CMakeLists.txt +++ b/Tests/LoadCommand/CMakeCommands/CMakeLists.txt @@ -5,8 +5,6 @@ IF (MUDSLIDE_TYPE MATCHES MUCHO) ADD_DEFINITIONS(-DMUCHO_MUDSLIDE) ENDIF (MUDSLIDE_TYPE MATCHES MUCHO) -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}") -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}") IF(WATCOM) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") ENDIF(WATCOM) diff --git a/Tests/LoadCommandOneConfig/CMakeCommands/CMakeLists.txt b/Tests/LoadCommandOneConfig/CMakeCommands/CMakeLists.txt index 4ba21d2743..953d05c999 100644 --- a/Tests/LoadCommandOneConfig/CMakeCommands/CMakeLists.txt +++ b/Tests/LoadCommandOneConfig/CMakeCommands/CMakeLists.txt @@ -5,8 +5,6 @@ IF (MUDSLIDE_TYPE MATCHES MUCHO) ADD_DEFINITIONS(-DMUCHO_MUDSLIDE) ENDIF (MUDSLIDE_TYPE MATCHES MUCHO) -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}") -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}") IF(WATCOM) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") ENDIF(WATCOM) diff --git a/Tests/MacroTest/CMakeLists.txt b/Tests/MacroTest/CMakeLists.txt index 7ec50c7b7c..ef673fd850 100644 --- a/Tests/MacroTest/CMakeLists.txt +++ b/Tests/MacroTest/CMakeLists.txt @@ -2,8 +2,6 @@ cmake_minimum_required (VERSION 2.6) PROJECT (MacroTest) -SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}") - MACRO(FAILED testname) MESSAGE(SEND_ERROR "${testname} failed ${ARGN}") ENDMACRO(FAILED) diff --git a/Tests/MakeClean/CMakeLists.txt b/Tests/MakeClean/CMakeLists.txt index aaf39d79d9..97d3554bd2 100644 --- a/Tests/MakeClean/CMakeLists.txt +++ b/Tests/MakeClean/CMakeLists.txt @@ -1,8 +1,6 @@ cmake_minimum_required (VERSION 2.6) PROJECT(MakeClean) -SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}") - # Build the to-clean project. TRY_COMPILE(TOCLEAN_BUILT ${MakeClean_BINARY_DIR}/ToClean @@ -33,11 +31,6 @@ FOREACH(f ${TOCLEAN_FILES}) ENDIF(EXISTS "${f}") ENDFOREACH(f) -# Enable ANSI flags for the C executable. -IF(CMAKE_ANSI_CFLAGS) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}") -ENDIF(CMAKE_ANSI_CFLAGS) - # Configure an executable to check that all the files are missing. SET(CHECK_FILES) FOREACH(f ${TOCLEAN_FILES}) diff --git a/Tests/Plugin/CMakeLists.txt b/Tests/Plugin/CMakeLists.txt index 38347a974d..b0942c0420 100644 --- a/Tests/Plugin/CMakeLists.txt +++ b/Tests/Plugin/CMakeLists.txt @@ -6,11 +6,6 @@ SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${Plugin_BINARY_DIR}/bin) SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${Plugin_BINARY_DIR}/lib/plugin) SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${Plugin_BINARY_DIR}/lib/static) -# We need ansi C support. -IF(CMAKE_ANSI_CFLAGS) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}") -ENDIF(CMAKE_ANSI_CFLAGS) - # We need the dynamic loader support from KWSys to load the plugin in # the executable. SET(KWSYS_NAMESPACE kwsys) diff --git a/Tests/Preprocess/CMakeLists.txt b/Tests/Preprocess/CMakeLists.txt index 2401d59b64..04c3f1015e 100644 --- a/Tests/Preprocess/CMakeLists.txt +++ b/Tests/Preprocess/CMakeLists.txt @@ -4,11 +4,6 @@ project(Preprocess) # This test is meant both as a test and as a reference for supported # syntax on native tool command lines. -# We need ansi C support. -IF(CMAKE_ANSI_CFLAGS) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}") -ENDIF(CMAKE_ANSI_CFLAGS) - # Determine the build tool being used. Not all characters can be # escaped for all build tools. This test checks all characters known # to work with each tool and documents those known to not work. diff --git a/Tests/ReturnTest/CMakeLists.txt b/Tests/ReturnTest/CMakeLists.txt index 7c9156bf83..a08855ec18 100644 --- a/Tests/ReturnTest/CMakeLists.txt +++ b/Tests/ReturnTest/CMakeLists.txt @@ -2,8 +2,6 @@ cmake_minimum_required (VERSION 2.6) project (ReturnTest) -set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}") - function (FAILED testname) message (SEND_ERROR "${testname} failed ${ARGN}") endfunction (FAILED) diff --git a/Tests/RuntimePath/CMakeLists.txt b/Tests/RuntimePath/CMakeLists.txt index 55557093a2..2164cdb8df 100644 --- a/Tests/RuntimePath/CMakeLists.txt +++ b/Tests/RuntimePath/CMakeLists.txt @@ -1,10 +1,6 @@ cmake_minimum_required (VERSION 2.6) project(RuntimePath C) -if(CMAKE_ANSI_CFLAGS) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}") -endif(CMAKE_ANSI_CFLAGS) - # Add a simple chain of shared libraries that must be found. add_library(foo1 SHARED foo1.c) set_property(TARGET foo1 PROPERTY OUTPUT_NAME foo) diff --git a/Tests/SourceGroups/CMakeLists.txt b/Tests/SourceGroups/CMakeLists.txt index 2bc511d25a..b665115a29 100644 --- a/Tests/SourceGroups/CMakeLists.txt +++ b/Tests/SourceGroups/CMakeLists.txt @@ -1,13 +1,6 @@ cmake_minimum_required (VERSION 2.6) project(SourceGroups) -# We need ansi C support, otherwise it doesn't build e.g. on HP-UX: -# main.c", line 3: error 1705: Function prototypes are an ANSI feature. -IF(CMAKE_ANSI_CFLAGS) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}") -ENDIF(CMAKE_ANSI_CFLAGS) - - # this is not really a test which can fail # it is more an example with several source_group() # commands. |