basedOpinionated utility library |
git clone git://git.dimitrijedobrota.com/based.git |
Log | Files | Refs | README | LICENSE | HACKING | CONTRIBUTING | CODE_OF_CONDUCT | BUILDING |
variables.cmake (999B)
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 based
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(based_DEVELOPER_MODE "Enable developer mode" OFF)
8 endif()
10 # ---- Warning guard ----
12 # target_include_directories with the SYSTEM modifier will request the compiler
13 # to omit warnings from the provided paths, if the compiler supports that
14 # This is to provide a user experience similar to find_package when
15 # add_subdirectory or FetchContent is used to consume this project
16 set(warning_guard "")
17 if(NOT PROJECT_IS_TOP_LEVEL)
18 option(
19 based_INCLUDES_WITH_SYSTEM
20 "Use SYSTEM modifier for based's includes, disabling warnings"
21 ON
22 )
23 mark_as_advanced(based_INCLUDES_WITH_SYSTEM)
24 if(based_INCLUDES_WITH_SYSTEM)
25 set(warning_guard SYSTEM)
26 endif()
27 endif()