cemplateSimple C++ template engine |
git clone git://git.dimitrijedobrota.com/cemplate.git |
Log | Files | Refs | README | LICENSE | HACKING | CONTRIBUTING | CODE_OF_CONDUCT | BUILDING |
variables.cmake (1402B)
0 # ---- Developer mode ---- 1 2 # Developer mode enables targets and code paths in the CMake scripts that are 3 # only relevant for the developer(s) of cemplate 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(cemplate_DEVELOPER_MODE "Enable developer mode" OFF) 8 option(BUILD_SHARED_LIBS "Build shared libs." OFF) 9 endif() 10 11 # ---- Suppress C4251 on Windows ---- 12 13 # Please see include/cemplate/cemplate.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 CEMPLATE_SUPPRESS_C4251 _Pragma(\"warning(suppress:4251)\") 18 #else 19 # define CEMPLATE_SUPPRESS_C4251 20 #endif 21 ") 22 23 # ---- Warning guard ---- 24 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 cemplate_INCLUDES_WITH_SYSTEM 33 "Use SYSTEM modifier for cemplate's includes, disabling warnings" 34 ON 35 ) 36 mark_as_advanced(cemplate_INCLUDES_WITH_SYSTEM) 37 if(cemplate_INCLUDES_WITH_SYSTEM) 38 set(warning_guard SYSTEM) 39 endif() 40 endif()