cmake: disable package registry

This commit is contained in:
Florian Franzen 2019-01-31 10:17:55 +01:00
parent ca5004e26c
commit e0e4577c0f

View file

@ -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