diff options
author | Brad King <brad.king@kitware.com> | 2022-04-22 12:58:59 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-04-22 12:59:09 (GMT) |
commit | 1bd85e8f3f57d4c279dcd2a3ea4c24a0cf3c5f58 (patch) | |
tree | 54736201fe3a5d967355197eb836a21f23d1ea5c /Source/cmFindCommon.cxx | |
parent | 5e9c3e2f0734097aa7820a212723f8ef1ecb27a3 (diff) | |
parent | 42f7e397894c5132b4706f478e62ce5d648119c1 (diff) | |
download | CMake-1bd85e8f3f57d4c279dcd2a3ea4c24a0cf3c5f58.zip CMake-1bd85e8f3f57d4c279dcd2a3ea4c24a0cf3c5f58.tar.gz CMake-1bd85e8f3f57d4c279dcd2a3ea4c24a0cf3c5f58.tar.bz2 |
Merge topic 'NO_CMAKE_INSTALL_PREFIX'
42f7e39789 Find: Support per call disabling of CMAKE_INSTALL_PREFIX
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !7163
Diffstat (limited to 'Source/cmFindCommon.cxx')
-rw-r--r-- | Source/cmFindCommon.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx index 7106e4b..9fd712a 100644 --- a/Source/cmFindCommon.cxx +++ b/Source/cmFindCommon.cxx @@ -39,6 +39,7 @@ cmFindCommon::cmFindCommon(cmExecutionStatus& status) this->NoCMakeEnvironmentPath = false; this->NoSystemEnvironmentPath = false; this->NoCMakeSystemPath = false; + this->NoCMakeInstallPath = false; // OS X Bundle and Framework search policy. The default is to // search frameworks first on apple. @@ -179,14 +180,15 @@ void cmFindCommon::SelectDefaultMacMode() void cmFindCommon::SelectDefaultSearchModes() { - const std::array<std::pair<bool&, std::string>, 5> search_paths = { + const std::array<std::pair<bool&, std::string>, 6> search_paths = { { { this->NoPackageRootPath, "CMAKE_FIND_USE_PACKAGE_ROOT_PATH" }, { this->NoCMakePath, "CMAKE_FIND_USE_CMAKE_PATH" }, { this->NoCMakeEnvironmentPath, "CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH" }, { this->NoSystemEnvironmentPath, "CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH" }, - { this->NoCMakeSystemPath, "CMAKE_FIND_USE_CMAKE_SYSTEM_PATH" } } + { this->NoCMakeSystemPath, "CMAKE_FIND_USE_CMAKE_SYSTEM_PATH" }, + { this->NoCMakeInstallPath, "CMAKE_FIND_USE_INSTALL_PREFIX" } } }; for (auto const& path : search_paths) { @@ -348,6 +350,8 @@ bool cmFindCommon::CheckCommonArgument(std::string const& arg) this->NoSystemEnvironmentPath = true; } else if (arg == "NO_CMAKE_SYSTEM_PATH") { this->NoCMakeSystemPath = true; + } else if (arg == "NO_CMAKE_INSTALL_PREFIX") { + this->NoCMakeInstallPath = true; } else if (arg == "NO_CMAKE_FIND_ROOT_PATH") { this->FindRootPathMode = RootPathModeNever; } else if (arg == "ONLY_CMAKE_FIND_ROOT_PATH") { |