Skip to content
Snippets Groups Projects
Commit fa436db8 authored by Lars Bilke's avatar Lars Bilke
Browse files

Added script for disabling compiler flags.

parent 7216a6df
No related branches found
No related tags found
No related merge requests found
# DisableCompilerFlag.cmake
#
# 2012-05-14 Lars Bilke
#
# Removes the given FLAG from the compiler flags in the given CONFIGURATION.
# The Configuration must be uppercased.
#
# Usage:
#
# include(DisableCompilerFlag)
# if (MSVC)
# DisableCompilerFlag(DEBUG /RTC1)
# endif ()
macro(DisableCompilerFlag CONFIGURATION FLAG)
if(CMAKE_CXX_FLAGS_${CONFIGURATION} MATCHES "${FLAG}")
string(REPLACE "${FLAG}" " " CMAKE_CXX_FLAGS_${CONFIGURATION} "${CMAKE_CXX_FLAGS_${CONFIGURATION}}")
# message(STATUS ${PROJECT_NAME} " CMAKE_CXX_FLAGS_${CONFIGURATION} removing ${FLAG}")
endif()
endmacro()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment