commit 99c92de8aa77fd9553d72c98013cf89dccd3b468
Author: Kornel Benko <[email protected]>
Date: Thu Dec 5 12:00:02 2013 +0100
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
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e72aad5..fa16d10 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)