stamd

Static Markdown Page Generator
git clone git://git.dimitrijedobrota.com/stamd.git
Log | Files | Refs | README | LICENSE

variables.cmake (999B)


      1 # ---- Developer mode ----
      2 
      3 # Developer mode enables targets and code paths in the CMake scripts that are
      4 # only relevant for the developer(s) of stamd
      5 # Targets necessary to build the project must be provided unconditionally, so
      6 # consumers can trivially build and package the project
      7 if(PROJECT_IS_TOP_LEVEL)
      8   option(stamd_DEVELOPER_MODE "Enable developer mode" OFF)
      9 endif()
     10 
     11 # ---- Warning guard ----
     12 
     13 # target_include_directories with the SYSTEM modifier will request the compiler
     14 # to omit warnings from the provided paths, if the compiler supports that
     15 # This is to provide a user experience similar to find_package when
     16 # add_subdirectory or FetchContent is used to consume this project
     17 set(warning_guard "")
     18 if(NOT PROJECT_IS_TOP_LEVEL)
     19   option(
     20       stamd_INCLUDES_WITH_SYSTEM
     21       "Use SYSTEM modifier for stamd's includes, disabling warnings"
     22       ON
     23   )
     24   mark_as_advanced(stamd_INCLUDES_WITH_SYSTEM)
     25   if(stamd_INCLUDES_WITH_SYSTEM)
     26     set(warning_guard SYSTEM)
     27   endif()
     28 endif()