Improve 4ae560156348 and allow it to be set as an option

This commit is contained in:
Denis Blank 2018-11-18 19:00:38 +01:00
parent 8e7af3a320
commit 2ff7bb9b8d
2 changed files with 17 additions and 1 deletions

View File

@ -57,6 +57,13 @@ option(CTI_CONTINUABLE_WITH_LIGHT_TESTS
"Disable some template heavy unit tests (for CI usage)"
OFF)
# Top level project settings only
if (IS_TOP_LEVEL_PROJECT)
set(CTI_CONTINUABLE_WITH_CONCURRENT_JOBS
"0" CACHE STRING
"Set the number of concurrent compilation jobs (0 = unlimited, for CI usage)")
endif()
include(cmake/CMakeLists.txt)
set(THREADS_PREFER_PTHREAD_FLAG ON)

View File

@ -31,9 +31,18 @@ if (PLATFORM EQUAL 64)
-D_WIN64)
endif()
if (CTI_CONTINUABLE_WITH_CONCURRENT_JOBS)
target_compile_options(continuable-features-flags
INTERFACE
/MP${CTI_CONTINUABLE_WITH_CONCURRENT_JOBS})
else()
target_compile_options(continuable-features-flags
INTERFACE
/MP)
endif()
target_compile_options(continuable-features-flags
INTERFACE
/MP2
/bigobj
/permissive-)