diff options
-rw-r--r-- | common.cmake | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/common.cmake b/common.cmake index c2527de..b1ea33e 100644 --- a/common.cmake +++ b/common.cmake @@ -48,11 +48,21 @@ if(parent_directory) set(default_value OFF) endif() -set(CC_CXX_STANDARD "14" CACHE STRING "C++ standard version") -option(CC_BEST_PRACTICES "Set common compiler options" "${default_value}") -option(CC_WINDOWS_DEF "Define useful Windows macros" "${default_value}") -option(CC_STATIC_RUNTIME "Link the runtime statically" "${default_value}") -option(CC_STRIP_SYMBOLS "Strip debug symbols" "${default_value}") +if(NOT DEFINED CC_CXX_STANDARD) + set(CC_CXX_STANDARD "14" CACHE STRING "C++ standard version") +endif() +if(NOT DEFINED CC_BEST_PRACTICES) + option(CC_BEST_PRACTICES "Set common compiler options" "${default_value}") +endif() +if(NOT DEFINED CC_WINDOWS_DEF) + option(CC_WINDOWS_DEF "Define useful Windows macros" "${default_value}") +endif() +if(NOT DEFINED CC_STATIC_RUNTIME) + option(CC_STATIC_RUNTIME "Link the runtime statically" "${default_value}") +endif() +if(NOT DEFINED CC_STRIP_SYMBOLS) + option(CC_STRIP_SYMBOLS "Strip debug symbols" "${default_value}") +endif() option(Boost_USE_STATIC_LIBS "Use the static Boost libraries" "${default_value}") option(Boost_USE_STATIC_RUNTIME "Use Boost libraries linked to the runtime statically" "${CC_STATIC_RUNTIME}") |