mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 14:41:17 +00:00
Merge pull request #55046 from FlorianFranzen/cmake_no_pkg_reg
cmake: disable package registry
This commit is contained in:
commit
97507ffc8b
|
@ -75,6 +75,13 @@ cmakeConfigurePhase() {
|
|||
# And build always Release, to ensure optimisation flags
|
||||
cmakeFlags="-DCMAKE_BUILD_TYPE=${cmakeBuildType:-Release} -DCMAKE_SKIP_BUILD_RPATH=ON $cmakeFlags"
|
||||
|
||||
# Disable user package registry to avoid potential side effects
|
||||
# and unecessary attempts to access non-existent home folder
|
||||
# https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#disabling-the-package-registry
|
||||
cmakeFlags="-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON $cmakeFlags"
|
||||
|
||||
if [ "$buildPhase" = ninjaBuildPhase ]; then
|
||||
cmakeFlags="-GNinja $cmakeFlags"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue