We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 17a6088 + 0be4bb4 commit b1f31abCopy full SHA for b1f31ab
cmake/modules/SwiftSupport.cmake
@@ -1,5 +1,6 @@
1
2
include(CMakeParseArguments)
3
+include(ProcessorCount)
4
5
# Creates an output file map give a target and its list of sources at
6
# output_path
@@ -43,6 +44,10 @@ function(add_swift_target target)
43
44
set(link_flags)
45
46
list(APPEND compile_flags -incremental)
47
+ ProcessorCount(CPU_COUNT)
48
+ if(NOT CPU_COUNT EQUAL 0)
49
+ list(APPEND compile_flags -j;${CPU_COUNT})
50
+ endif()
51
if(AST_TARGET)
52
list(APPEND compile_flags -target;${AST_TARGET})
53
list(APPEND link_flags -target;${AST_TARGET})
0 commit comments