stamen

Static Menu Generator
git clone git://git.dimitrijedobrota.com/stamen.git
Log | Files | Refs | README | LICENSE | HACKING | CONTRIBUTING | CODE_OF_CONDUCT | BUILDING

variables.cmake (1382B)


0 # ---- Developer mode ----
2 # Developer mode enables targets and code paths in the CMake scripts that are
3 # only relevant for the developer(s) of stamen
4 # Targets necessary to build the project must be provided unconditionally, so
5 # consumers can trivially build and package the project
6 if(PROJECT_IS_TOP_LEVEL)
7 option(stamen_DEVELOPER_MODE "Enable developer mode" OFF)
8 option(BUILD_SHARED_LIBS "Build shared libs." OFF)
9 endif()
11 # ---- Suppress C4251 on Windows ----
13 # Please see include/stamen/stamen.hpp for more details
14 set(pragma_suppress_c4251 "
15 /* This needs to suppress only for MSVC */
16 #if defined(_MSC_VER) && !defined(__ICL)
17 # define STAMEN_SUPPRESS_C4251 _Pragma(\"warning(suppress:4251)\")
18 #else
19 # define STAMEN_SUPPRESS_C4251
20 #endif
21 ")
23 # ---- Warning guard ----
25 # target_include_directories with the SYSTEM modifier will request the compiler
26 # to omit warnings from the provided paths, if the compiler supports that
27 # This is to provide a user experience similar to find_package when
28 # add_subdirectory or FetchContent is used to consume this project
29 set(warning_guard "")
30 if(NOT PROJECT_IS_TOP_LEVEL)
31 option(
32 stamen_INCLUDES_WITH_SYSTEM
33 "Use SYSTEM modifier for stamen's includes, disabling warnings"
34 ON
35 )
36 mark_as_advanced(stamen_INCLUDES_WITH_SYSTEM)
37 if(stamen_INCLUDES_WITH_SYSTEM)
38 set(warning_guard SYSTEM)
39 endif()
40 endif()