CMake: allow compile-time C++ flags to be set

For developper only, therefore the variable is set to advanced.

Ideas from: Scott Kostyshak + Vincent van Ravensteijn
This commit is contained in:
Kornel Benko 2013-12-05 12:00:02 +01:00
parent 5955e83b1a
commit 99c92de8aa

View File

@ -469,8 +469,12 @@ if(NOT MSVC)
endif()
endif()
set(LYX_CXX_FLAGS_EXTRA "" CACHE STRING "Desired semicolon separated list of extra cxx compile flags, like '-Werror'")
mark_as_advanced(LYX_CXX_FLAGS_EXTRA)
if(LYX_CXX_FLAGS_EXTRA)
add_definitions(${LYX_CXX_FLAGS_EXTRA})
foreach(_flag ${LYX_CXX_FLAGS_EXTRA})
add_definitions(${_flag})
endforeach()
endif()
find_package(Qt5Core QUIET)