summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-10-24 16:35:25 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-10-24 16:35:33 (GMT)
commitc2ec949a05d0b4515abb17211ba7eefc1910591d (patch)
tree2e915366d0133d486691cf421c484c2eaea52c2c /Source
parenta693ca6e4a4349898361ede9949c1eb973b6b349 (diff)
parent3c3bce133dda14a60d15eaa03edff527a53c01d4 (diff)
downloadCMake-c2ec949a05d0b4515abb17211ba7eefc1910591d.zip
CMake-c2ec949a05d0b4515abb17211ba7eefc1910591d.tar.gz
CMake-c2ec949a05d0b4515abb17211ba7eefc1910591d.tar.bz2
Merge topic 'set_environment_generator'
3c3bce133d cmake: Honor CMAKE_GENERATOR env var in --help output Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Acked-by: Alex Turbov <i.zaufi@gmail.com> Merge-request: !7808
Diffstat (limited to 'Source')
-rw-r--r--Source/CursesDialog/ccmake.cxx2
-rw-r--r--Source/QtDialog/CMakeSetup.cxx2
-rw-r--r--Source/cmState.cxx2
-rw-r--r--Source/cmState.h1
-rw-r--r--Source/cmake.cxx2
-rw-r--r--Source/cmakemain.cxx2
6 files changed, 7 insertions, 4 deletions
diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx
index 1f7776c..70ed648 100644
--- a/Source/CursesDialog/ccmake.cxx
+++ b/Source/CursesDialog/ccmake.cxx
@@ -77,7 +77,7 @@ int main(int argc, char const* const* argv)
cmDocumentation doc;
doc.addCMakeStandardDocSections();
if (doc.CheckOptions(argc, argv)) {
- cmake hcm(cmake::RoleInternal, cmState::Unknown);
+ cmake hcm(cmake::RoleInternal, cmState::Help);
hcm.SetHomeDirectory("");
hcm.SetHomeOutputDirectory("");
hcm.AddCMakePaths();
diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx
index fb12b7d..591b793 100644
--- a/Source/QtDialog/CMakeSetup.cxx
+++ b/Source/QtDialog/CMakeSetup.cxx
@@ -79,7 +79,7 @@ int main(int argc, char** argv)
doc.addCMakeStandardDocSections();
if (argc2 > 1 && doc.CheckOptions(argc2, argv2)) {
// Construct and print requested documentation.
- cmake hcm(cmake::RoleInternal, cmState::Unknown);
+ cmake hcm(cmake::RoleInternal, cmState::Help);
hcm.SetHomeDirectory("");
hcm.SetHomeOutputDirectory("");
hcm.AddCMakePaths();
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 3d38e73..17ee7f3 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -786,6 +786,8 @@ std::string cmState::ModeToString(cmState::Mode mode)
return "CTEST";
case CPack:
return "CPACK";
+ case Help:
+ return "HELP";
case Unknown:
return "UNKNOWN";
}
diff --git a/Source/cmState.h b/Source/cmState.h
index 2d0c521..9a17b22 100644
--- a/Source/cmState.h
+++ b/Source/cmState.h
@@ -53,6 +53,7 @@ public:
FindPackage,
CTest,
CPack,
+ Help
};
enum class ProjectKind
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 8798f02..73b8e88 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -196,7 +196,7 @@ cmake::cmake(Role role, cmState::Mode mode, cmState::ProjectKind projectKind)
this->AddProjectCommands();
}
- if (mode == cmState::Project) {
+ if (mode == cmState::Project || mode == cmState::Help) {
this->LoadEnvironmentPresets();
}
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index b754b72..928c1ba 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -208,7 +208,7 @@ int do_cmake(int ac, char const* const* av)
doc.addCMakeStandardDocSections();
if (doc.CheckOptions(ac, av, "--")) {
// Construct and print requested documentation.
- cmake hcm(cmake::RoleInternal, cmState::Unknown);
+ cmake hcm(cmake::RoleInternal, cmState::Help);
hcm.SetHomeDirectory("");
hcm.SetHomeOutputDirectory("");
hcm.AddCMakePaths();