Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[qt5] Add -j to make to parallelize on Linux and MacOS #11111

Merged
merged 4 commits into from
May 4, 2020

Conversation

BillyONeal
Copy link
Member

No description provided.

@BillyONeal BillyONeal added the info:internal This PR or Issue was filed by the vcpkg team. label May 1, 2020
@BillyONeal BillyONeal self-assigned this May 1, 2020
@BillyONeal BillyONeal marked this pull request as draft May 1, 2020 06:20
@Neumann-A
Copy link
Contributor

I think there is a VCPKG variable for concurrency. VCPKG_CONCURRENCY or similar. Should be visible with --debug in the cmake call if I am not mistaken. Currently on mobile so I cannot check it.

@jwillemsen
Copy link
Contributor

There is a VCPKG_CONCURRENCY, see

COMMAND make ${_ace_makefile_macros} "-j${VCPKG_CONCURRENCY}"
where we use it work regular make

@@ -29,6 +30,7 @@ function(vcpkg_build_qmake)

function(run_jom TARGETS LOG_PREFIX LOG_SUFFIX)
message(STATUS "Package ${LOG_PREFIX}-${TARGET_TRIPLET}-${LOG_SUFFIX}")
list(PREPEND TARGETS ${INVOKE_ARGS})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMake too old on Linux CI. PREPEND was introduced with 3.15 https://cmake.org/cmake/help/v3.15/release/3.15.html#commands

@Neumann-A
Copy link
Contributor

Since you are already touching concurrency settings:

if (_bc_DISABLE_PARALLEL)
set(NUMBER_OF_PROCESSORS "1")
else()
if(DEFINED ENV{NUMBER_OF_PROCESSORS})
set(NUMBER_OF_PROCESSORS $ENV{NUMBER_OF_PROCESSORS})
elseif(VCPKG_TARGET_IS_OSX)
execute_process(
COMMAND sysctl -n hw.ncpu
OUTPUT_VARIABLE NUMBER_OF_PROCESSORS
)
string(REPLACE "\n" "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}")
string(REPLACE " " "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}")
else()
execute_process(
COMMAND nproc
OUTPUT_VARIABLE NUMBER_OF_PROCESSORS
)
string(REPLACE "\n" "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}")
string(REPLACE " " "" NUMBER_OF_PROCESSORS "${NUMBER_OF_PROCESSORS}")
endif()
endif()

could also be removed and replaced with VCPKG_CONCURRENCY

@BillyONeal BillyONeal force-pushed the parallelize_qt branch 2 times, most recently from 584ff75 to ac81c9c Compare May 2, 2020 00:43
@BillyONeal BillyONeal marked this pull request as ready for review May 2, 2020 01:15
@BillyONeal BillyONeal merged commit 7db401c into microsoft:master May 4, 2020
@BillyONeal BillyONeal deleted the parallelize_qt branch May 4, 2020 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info:internal This PR or Issue was filed by the vcpkg team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants