displayLayout and Rendering TUI library |
git clone git://git.dimitrijedobrota.com/display.git |
Log | Files | Refs | README | LICENSE | HACKING | CONTRIBUTING | CODE_OF_CONDUCT | BUILDING |
variables.cmake (1392B)
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 display
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(display_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/display/display.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 DISPLAY_SUPPRESS_C4251 _Pragma(\"warning(suppress:4251)\")
18 #else
19 # define DISPLAY_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 display_INCLUDES_WITH_SYSTEM
33 "Use SYSTEM modifier for display's includes, disabling warnings"
34 ON
35 )
36 mark_as_advanced(display_INCLUDES_WITH_SYSTEM)
37 if(display_INCLUDES_WITH_SYSTEM)
38 set(warning_guard SYSTEM)
39 endif()
40 endif()