FOREACH(_flag
CXX_FLAGS_RELEASE
CXX_FLAGS_DEBUG
+ SHARED_LINKER_FLAGS_RELEASE
+ SHARED_LINKER_FLAGS_DEBUG
)
IF(NOT "${CMAKE_${_flag}}" STREQUAL "")
MESSAGE(FATAL_ERROR
CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_RELWITHDEBINFO
+ CMAKE_SHARED_LINKER_FLAGS_DEBUG
+ CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
+ CMAKE_SHARED_LINKER_FLAGS_RELEASE
+ CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
)
# Go away...
SET(${_flag} "" CACHE INTERNAL "" FORCE)
MARK_AS_ADVANCED(${_flag})
ENDFOREACH()
-
#
# Finally, read in CFLAGS, CXXFLAGS and LDFLAGS from environment and
# prepend them to the saved variables:
#
SET(CMAKE_C_FLAGS_SAVED "$ENV{CFLAGS} ${CMAKE_C_FLAGS_SAVED}")
SET(CMAKE_CXX_FLAGS_SAVED "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS_SAVED}")
-SET(CMAKE_SHARED_LINKER_FLAGS_SAVED "$ENV{LDFLAGS} ${CMAKE_SHARED_LINKER_FLAGS}")
+SET(CMAKE_SHARED_LINKER_FLAGS_SAVED "$ENV{LDFLAGS} ${CMAKE_SHARED_LINKER_FLAGS_SAVED}")
UNSET(ENV{CFLAGS})
UNSET(ENV{CXXFLAGS})
UNSET(ENV{LDFLAGS})