Commit f62e242f authored by Thomas Feuvrier's avatar Thomas Feuvrier
Browse files

Modif :

Ajout de CMAKE_COMPILER_IS_GNUCC en plus de CMAKE_COMPILER_IS_GNUCXX
Ajout de CMAKE_C_FLAGS en plus de CMAKE_CXX_FLAGS
parent 240b4150
......@@ -261,21 +261,37 @@ ENDIF(MINGW)
#-----------------------------------------------------------------------------
# Adjust the compiler flags to avoid all warning.
IF(CMAKE_COMPILER_IS_GNUCXX)
# Hide warnings in ossim code.
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
# CMake versions before 2.4 did not put the source-file-specific flags
# after the directory-level flags. Remove optimization flags from the
# CMAKE_CXX_FLAGS* variables so they can be overridden.
IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.4)
FOREACH(c "" "_DEBUG" "_RELEASE" "_MINSIZEREL" "_RELWITHDEBINFO")
STRING(REGEX REPLACE
"-O[^ ]*( |$)" "" CMAKE_CXX_FLAGS${c} "${CMAKE_CXX_FLAGS${c}}")
ENDFOREACH(c)
ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.4)
IF(UNIX)
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w")
# CMake versions before 2.4 did not put the source-file-specific flags
# after the directory-level flags. Remove optimization flags from the
# CMAKE_CXX_FLAGS* variables so they can be overridden.
IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.4)
FOREACH(c "" "_DEBUG" "_RELEASE" "_MINSIZEREL" "_RELWITHDEBINFO")
STRING(REGEX REPLACE
"-O[^ ]*( |$)" "" CMAKE_CXX_FLAGS${c} "${CMAKE_CXX_FLAGS${c}}")
ENDFOREACH(c)
ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.4)
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
IF(CMAKE_COMPILER_IS_GNUCC)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
# CMake versions before 2.4 did not put the source-file-specific flags
# after the directory-level flags. Remove optimization flags from the
# CMAKE_C_FLAGS* variables so they can be overridden.
IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.4)
FOREACH(c "" "_DEBUG" "_RELEASE" "_MINSIZEREL" "_RELWITHDEBINFO")
STRING(REGEX REPLACE
"-O[^ ]*( |$)" "" CMAKE_C_FLAGS${c} "${CMAKE_C_FLAGS${c}}")
ENDFOREACH(c)
ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.4)
ENDIF(CMAKE_COMPILER_IS_GNUCC)
ENDIF(UNIX)
#-----------------------------------------------------------------------------
# Find platform-specific differences in the handling of IEEE floating point
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment