forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cmake] Always add local swift compilation jobs to the local job pool.
Compiling swift modules are always compiled local... so put them in the local job pool.
- Loading branch information
Showing
3 changed files
with
26 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
function(initialize_local_jobpool) | ||
# Make a job pool for things that can't yet be distributed | ||
cmake_host_system_information( | ||
RESULT localhost_logical_cores QUERY NUMBER_OF_LOGICAL_CORES) | ||
set_property(GLOBAL PROPERTY JOB_POOLS local_jobs=${localhost_logical_cores}) | ||
# Put linking in that category. | ||
set_property(GLOBAL PROPERTY JOB_POOL_LINK local_jobs) | ||
endfunction() | ||
|
||
function(add_target_to_local_jobpool target) | ||
set_property(TARGET ${target} PROPERTY JOB_POOL_COMPILE local_jobs) | ||
# We do not need to set link jobs to be in local_jobs since above, we make | ||
# linking always local. | ||
endfunction() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters