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

For example, one could run CMake as follows:
  cmake -DLYX_CXX_FLAGS_EXTRA="-Werror"

Thanks to Kornel.
This commit is contained in:
Scott Kostyshak 2013-11-29 21:08:48 -05:00
parent 9edb2c5ec9
commit 374cf6a39f

View File

@ -468,6 +468,10 @@ if(NOT MSVC)
endif()
endif()
if(LYX_CXX_FLAGS_EXTRA)
add_definitions(${LYX_CXX_FLAGS_EXTRA})
endif()
find_package(Qt5Core QUIET)
if (Qt5Core_FOUND)
find_package(Qt5Widgets REQUIRED)