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.
This commit is contained in:
Brad King 2009-07-08 11:41:48 -04:00
parent a30a41e5ca
commit d1aa17a7b0
21 changed files with 0 additions and 79 deletions

View File

@ -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 ")

View File

@ -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

View File

@ -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 ")

View File

@ -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

View File

@ -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 ")

View File

@ -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

View File

@ -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)

View File

@ -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:

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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})

View File

@ -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)

View File

@ -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.

View File

@ -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)

View File

@ -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)

View File

@ -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.