diff options
author | Juan Ramos <cmake@jpr.mozmail.com> | 2022-10-21 01:53:14 (GMT) |
---|---|---|
committer | Juan Ramos <cmake@jpr.mozmail.com> | 2022-10-21 01:53:14 (GMT) |
commit | 3c3bce133dda14a60d15eaa03edff527a53c01d4 (patch) | |
tree | 61ba8fdd12f66c12d58783aad3b2bce1c18eee32 /Source | |
parent | f4995637a78dbc6c08b7472f55bb84936c9c4ab0 (diff) | |
download | CMake-3c3bce133dda14a60d15eaa03edff527a53c01d4.zip CMake-3c3bce133dda14a60d15eaa03edff527a53c01d4.tar.gz CMake-3c3bce133dda14a60d15eaa03edff527a53c01d4.tar.bz2 |
cmake: Honor CMAKE_GENERATOR env var in --help output
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CursesDialog/ccmake.cxx | 2 | ||||
-rw-r--r-- | Source/QtDialog/CMakeSetup.cxx | 2 | ||||
-rw-r--r-- | Source/cmState.cxx | 2 | ||||
-rw-r--r-- | Source/cmState.h | 1 | ||||
-rw-r--r-- | Source/cmake.cxx | 2 | ||||
-rw-r--r-- | Source/cmakemain.cxx | 2 |
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 c4c638c..8cdecc6 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(); |