mirror of
https://github.com/Naios/continuable.git
synced 2025-12-06 16:56:44 +08:00
Improve 4ae560156348 and allow it to be set as an option
This commit is contained in:
parent
8e7af3a320
commit
2ff7bb9b8d
@ -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)
|
||||
|
||||
@ -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-)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user