cmake --install: Respect CMAKE_DEFAULT_CONFIGS

When `cmake --install` is run with no `--config` passed, use
`CMAKE_DEFAULT_CONFIGS` to determine which config(s) to install.

Fixes: #21475
This commit is contained in:
Martin Duffy
2024-11-13 10:25:23 -05:00
committed by Brad King
parent 908b2ca27c
commit ea8e3107ec
13 changed files with 133 additions and 85 deletions

View File

@@ -16,9 +16,11 @@ class cmInstallScriptHandler
{
public:
cmInstallScriptHandler() = default;
cmInstallScriptHandler(std::string, std::string, std::vector<std::string>&);
bool isParallel();
int install(unsigned int j);
cmInstallScriptHandler(std::string, std::string, std::string,
std::vector<std::string>&);
bool IsParallel();
int Install(unsigned int j);
std::vector<std::vector<std::string>> GetCommands() const;
class InstallScript
{
public:
@@ -38,6 +40,8 @@ public:
private:
std::vector<std::vector<std::string>> commands;
std::vector<std::string> directories;
std::vector<std::string> configs;
std::string binaryDir;
std::string component;
bool parallel;
};