Skip to content
Snippets Groups Projects
Commit 20759dcf authored by Mathieu Deltorre's avatar Mathieu Deltorre
Browse files

Ajout flag -w si gcc

parent eed8bd28
Branches
Tags
No related merge requests found
......@@ -7,6 +7,23 @@ CONFIGURE_FILE(geo_config.h.in ${OTB_BINARY_DIR}/Utilities/otbgeotiff/geo_config
INCLUDE_DIRECTORIES(${OTB_BINARY_DIR}/Utilities/otbgeotiff/)
# Adjust the compiler flags to avoid problems with f2c-generated code.
IF(CMAKE_COMPILER_IS_GNUCC)
# Hide warnings in geotif code.
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)
ADD_LIBRARY(otbgeotiff ${libgeotiff_SRCS})
TARGET_LINK_LIBRARIES(otbgeotiff)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment