mirror of
https://github.com/Naios/continuable.git
synced 2025-12-07 01:06: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)"
|
"Disable some template heavy unit tests (for CI usage)"
|
||||||
OFF)
|
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)
|
include(cmake/CMakeLists.txt)
|
||||||
|
|
||||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||||
|
|||||||
@ -31,9 +31,18 @@ if (PLATFORM EQUAL 64)
|
|||||||
-D_WIN64)
|
-D_WIN64)
|
||||||
endif()
|
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
|
target_compile_options(continuable-features-flags
|
||||||
INTERFACE
|
INTERFACE
|
||||||
/MP2
|
|
||||||
/bigobj
|
/bigobj
|
||||||
/permissive-)
|
/permissive-)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user