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:
parent
a30a41e5ca
commit
d1aa17a7b0
|
@ -78,13 +78,6 @@ IF(NOT 2.4 EQUAL 2.4)
|
||||||
MESSAGE(FATAL_ERROR "Failed: NOT 2.4 EQUAL 2.4")
|
MESSAGE(FATAL_ERROR "Failed: NOT 2.4 EQUAL 2.4")
|
||||||
ENDIF(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(CMAKE_SYSTEM MATCHES "OSF1-V.*")
|
||||||
IF(NOT CMAKE_COMPILER_IS_GNUCXX)
|
IF(NOT CMAKE_COMPILER_IS_GNUCXX)
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ")
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ")
|
||||||
|
|
|
@ -4,7 +4,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 1.3)
|
||||||
#
|
#
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTEST_CXX_FLAGS")
|
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_C_FLAGS} -DTEST_C_FLAGS")
|
||||||
SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
|
|
||||||
|
|
||||||
IF(COMPLEX_TEST_CMAKELIB)
|
IF(COMPLEX_TEST_CMAKELIB)
|
||||||
# Link to CMake lib
|
# Link to CMake lib
|
||||||
|
|
|
@ -78,13 +78,6 @@ IF(NOT 2.4 EQUAL 2.4)
|
||||||
MESSAGE(FATAL_ERROR "Failed: NOT 2.4 EQUAL 2.4")
|
MESSAGE(FATAL_ERROR "Failed: NOT 2.4 EQUAL 2.4")
|
||||||
ENDIF(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(CMAKE_SYSTEM MATCHES "OSF1-V.*")
|
||||||
IF(NOT CMAKE_COMPILER_IS_GNUCXX)
|
IF(NOT CMAKE_COMPILER_IS_GNUCXX)
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ")
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ")
|
||||||
|
|
|
@ -4,7 +4,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 1.3)
|
||||||
#
|
#
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTEST_CXX_FLAGS")
|
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_C_FLAGS} -DTEST_C_FLAGS")
|
||||||
SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
|
|
||||||
|
|
||||||
IF(COMPLEX_TEST_CMAKELIB)
|
IF(COMPLEX_TEST_CMAKELIB)
|
||||||
# Link to CMake lib
|
# Link to CMake lib
|
||||||
|
|
|
@ -78,13 +78,6 @@ IF(NOT 2.4 EQUAL 2.4)
|
||||||
MESSAGE(FATAL_ERROR "Failed: NOT 2.4 EQUAL 2.4")
|
MESSAGE(FATAL_ERROR "Failed: NOT 2.4 EQUAL 2.4")
|
||||||
ENDIF(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(CMAKE_SYSTEM MATCHES "OSF1-V.*")
|
||||||
IF(NOT CMAKE_COMPILER_IS_GNUCXX)
|
IF(NOT CMAKE_COMPILER_IS_GNUCXX)
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ")
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ")
|
||||||
|
|
|
@ -4,7 +4,6 @@ CMAKE_MINIMUM_REQUIRED(VERSION 1.3)
|
||||||
#
|
#
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DTEST_CXX_FLAGS")
|
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_C_FLAGS} -DTEST_C_FLAGS")
|
||||||
SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
|
|
||||||
|
|
||||||
IF(COMPLEX_TEST_CMAKELIB)
|
IF(COMPLEX_TEST_CMAKELIB)
|
||||||
# Link to CMake lib
|
# Link to CMake lib
|
||||||
|
|
|
@ -354,7 +354,6 @@ FOREACH(arg ${CHECK_ARGS} "")
|
||||||
"${EXPECTED_ARGUMENTS} \"${ARG}\",
|
"${EXPECTED_ARGUMENTS} \"${ARG}\",
|
||||||
")
|
")
|
||||||
ENDFOREACH(arg)
|
ENDFOREACH(arg)
|
||||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")
|
|
||||||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/check_command_line.c.in
|
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/check_command_line.c.in
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/check_command_line.c
|
${CMAKE_CURRENT_BINARY_DIR}/check_command_line.c
|
||||||
@ONLY IMMEDIATE)
|
@ONLY IMMEDIATE)
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
cmake_minimum_required (VERSION 2.6)
|
cmake_minimum_required (VERSION 2.6)
|
||||||
PROJECT( Dependency )
|
PROJECT( Dependency )
|
||||||
|
|
||||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")
|
|
||||||
|
|
||||||
# to test directories with only one character One was changed to 1
|
# to test directories with only one character One was changed to 1
|
||||||
# There is one executable that depends on eight libraries. The
|
# There is one executable that depends on eight libraries. The
|
||||||
# system has the following dependency graph:
|
# system has the following dependency graph:
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
project(CASE4 C)
|
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
|
# This is not really a circular dependency. "case4Bar" refers to a
|
||||||
# third-party library that happens to match the executable name, which
|
# third-party library that happens to match the executable name, which
|
||||||
# is okay when the executable is not a linkable target (ENABLE_EXPORTS
|
# is okay when the executable is not a linkable target (ENABLE_EXPORTS
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
cmake_minimum_required (VERSION 2.6)
|
cmake_minimum_required (VERSION 2.6)
|
||||||
project(Export C)
|
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
|
# Pretend that RelWithDebInfo should link to debug libraries to test
|
||||||
# the DEBUG_CONFIGURATIONS property.
|
# the DEBUG_CONFIGURATIONS property.
|
||||||
set_property(GLOBAL PROPERTY DEBUG_CONFIGURATIONS Debug RelWithDebInfo)
|
set_property(GLOBAL PROPERTY DEBUG_CONFIGURATIONS Debug RelWithDebInfo)
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
cmake_minimum_required (VERSION 2.6)
|
cmake_minimum_required (VERSION 2.6)
|
||||||
project(Import C)
|
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.
|
# Import everything in a subdirectory.
|
||||||
add_subdirectory(A)
|
add_subdirectory(A)
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
cmake_minimum_required (VERSION 2.6)
|
cmake_minimum_required (VERSION 2.6)
|
||||||
PROJECT (FunctionTest)
|
PROJECT (FunctionTest)
|
||||||
|
|
||||||
SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
|
|
||||||
|
|
||||||
FUNCTION(FAILED testname)
|
FUNCTION(FAILED testname)
|
||||||
MESSAGE(SEND_ERROR "${testname} failed ${ARGN}")
|
MESSAGE(SEND_ERROR "${testname} failed ${ARGN}")
|
||||||
ENDFUNCTION(FAILED)
|
ENDFUNCTION(FAILED)
|
||||||
|
|
|
@ -5,8 +5,6 @@ IF (MUDSLIDE_TYPE MATCHES MUCHO)
|
||||||
ADD_DEFINITIONS(-DMUCHO_MUDSLIDE)
|
ADD_DEFINITIONS(-DMUCHO_MUDSLIDE)
|
||||||
ENDIF (MUDSLIDE_TYPE MATCHES MUCHO)
|
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)
|
IF(WATCOM)
|
||||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||||
ENDIF(WATCOM)
|
ENDIF(WATCOM)
|
||||||
|
|
|
@ -5,8 +5,6 @@ IF (MUDSLIDE_TYPE MATCHES MUCHO)
|
||||||
ADD_DEFINITIONS(-DMUCHO_MUDSLIDE)
|
ADD_DEFINITIONS(-DMUCHO_MUDSLIDE)
|
||||||
ENDIF (MUDSLIDE_TYPE MATCHES MUCHO)
|
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)
|
IF(WATCOM)
|
||||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
||||||
ENDIF(WATCOM)
|
ENDIF(WATCOM)
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
cmake_minimum_required (VERSION 2.6)
|
cmake_minimum_required (VERSION 2.6)
|
||||||
PROJECT (MacroTest)
|
PROJECT (MacroTest)
|
||||||
|
|
||||||
SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
|
|
||||||
|
|
||||||
MACRO(FAILED testname)
|
MACRO(FAILED testname)
|
||||||
MESSAGE(SEND_ERROR "${testname} failed ${ARGN}")
|
MESSAGE(SEND_ERROR "${testname} failed ${ARGN}")
|
||||||
ENDMACRO(FAILED)
|
ENDMACRO(FAILED)
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
cmake_minimum_required (VERSION 2.6)
|
cmake_minimum_required (VERSION 2.6)
|
||||||
PROJECT(MakeClean)
|
PROJECT(MakeClean)
|
||||||
|
|
||||||
SET(CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
|
|
||||||
|
|
||||||
# Build the to-clean project.
|
# Build the to-clean project.
|
||||||
TRY_COMPILE(TOCLEAN_BUILT
|
TRY_COMPILE(TOCLEAN_BUILT
|
||||||
${MakeClean_BINARY_DIR}/ToClean
|
${MakeClean_BINARY_DIR}/ToClean
|
||||||
|
@ -33,11 +31,6 @@ FOREACH(f ${TOCLEAN_FILES})
|
||||||
ENDIF(EXISTS "${f}")
|
ENDIF(EXISTS "${f}")
|
||||||
ENDFOREACH(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.
|
# Configure an executable to check that all the files are missing.
|
||||||
SET(CHECK_FILES)
|
SET(CHECK_FILES)
|
||||||
FOREACH(f ${TOCLEAN_FILES})
|
FOREACH(f ${TOCLEAN_FILES})
|
||||||
|
|
|
@ -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_LIBRARY_OUTPUT_DIRECTORY ${Plugin_BINARY_DIR}/lib/plugin)
|
||||||
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${Plugin_BINARY_DIR}/lib/static)
|
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
|
# We need the dynamic loader support from KWSys to load the plugin in
|
||||||
# the executable.
|
# the executable.
|
||||||
SET(KWSYS_NAMESPACE kwsys)
|
SET(KWSYS_NAMESPACE kwsys)
|
||||||
|
|
|
@ -4,11 +4,6 @@ project(Preprocess)
|
||||||
# This test is meant both as a test and as a reference for supported
|
# This test is meant both as a test and as a reference for supported
|
||||||
# syntax on native tool command lines.
|
# 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
|
# Determine the build tool being used. Not all characters can be
|
||||||
# escaped for all build tools. This test checks all characters known
|
# escaped for all build tools. This test checks all characters known
|
||||||
# to work with each tool and documents those known to not work.
|
# to work with each tool and documents those known to not work.
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
cmake_minimum_required (VERSION 2.6)
|
cmake_minimum_required (VERSION 2.6)
|
||||||
project (ReturnTest)
|
project (ReturnTest)
|
||||||
|
|
||||||
set (CMAKE_C_FLAGS "${CMAKE_ANSI_CFLAGS} ${CMAKE_C_FLAGS}")
|
|
||||||
|
|
||||||
function (FAILED testname)
|
function (FAILED testname)
|
||||||
message (SEND_ERROR "${testname} failed ${ARGN}")
|
message (SEND_ERROR "${testname} failed ${ARGN}")
|
||||||
endfunction (FAILED)
|
endfunction (FAILED)
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
cmake_minimum_required (VERSION 2.6)
|
cmake_minimum_required (VERSION 2.6)
|
||||||
project(RuntimePath C)
|
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 a simple chain of shared libraries that must be found.
|
||||||
add_library(foo1 SHARED foo1.c)
|
add_library(foo1 SHARED foo1.c)
|
||||||
set_property(TARGET foo1 PROPERTY OUTPUT_NAME foo)
|
set_property(TARGET foo1 PROPERTY OUTPUT_NAME foo)
|
||||||
|
|
|
@ -1,13 +1,6 @@
|
||||||
cmake_minimum_required (VERSION 2.6)
|
cmake_minimum_required (VERSION 2.6)
|
||||||
project(SourceGroups)
|
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
|
# this is not really a test which can fail
|
||||||
# it is more an example with several source_group()
|
# it is more an example with several source_group()
|
||||||
# commands.
|
# commands.
|
||||||
|
|
Loading…
Reference in New Issue