File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,13 @@ include(cmake/StandardProjectSettings.cmake)
88add_library (project_options INTERFACE )
99target_compile_features (project_options INTERFACE cxx_std_17)
1010
11+ if (CMAKE_CXX_COMPILER_ID MATCHES ".*Clang" )
12+ option (ENABLE_BUILD_WITH_TIME_TRACE "Enable -ftime-trace to generate time tracing .json files on clang" OFF )
13+ if (ENABLE_BUILD_WITH_TIME_TRACE)
14+ add_compile_definitions (project_options INTERFACE -ftime-trace)
15+ endif ()
16+ endif ()
17+
1118# Link this 'library' to use the warnings specified in CompilerWarnings.cmake
1219add_library (project_warnings INTERFACE )
1320
@@ -35,7 +42,7 @@ if (ENABLE_PCH)
3542 # This sets a global PCH parameter, each project will build its own PCH, which
3643 # is a good idea if any #define's change
3744 #
38- #
45+ # consider breaking this out per project as necessary
3946 target_precompile_headers(project_options INTERFACE <vector> <string > <map> <utility>)
4047endif ()
4148
@@ -81,3 +88,12 @@ endif()
8188
8289
8390add_subdirectory (src)
91+
92+
93+ option (ENABLE_UNITY "Enable Unity builds of projects" OFF )
94+ if (ENABLE_UNITY)
95+ # Add for any project you want to apply unity builds for
96+ set_target_properties (intro PROPERTIES UNITY_BUILD ON )
97+ endif ()
98+
99+
Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ if(ENABLE_CLANG_TIDY)
2222endif ()
2323
2424if (ENABLE_INCLUDE_WHAT_YOU_USE)
25- find_program (INCLUDEWHATYOUUSE include -what-you-use)
26- if (INCLUDEWHATYOUUSE )
27- set (CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${INCLUDEWHATYOUUSE } )
25+ find_program (INCLUDE_WHAT_YOU_USE include -what-you-use)
26+ if (INCLUDE_WHAT_YOU_USE )
27+ set (CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${INCLUDE_WHAT_YOU_USE } )
2828 else ()
2929 message (SEND_ERROR "include-what-you-use requested but executable not found" )
3030 endif ()
You can’t perform that action at this time.
0 commit comments