diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 3540721d39..3f3e8d8ed0 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -2200,7 +2200,7 @@ bool cmCTestTestHandler::SetTestsProperties( // Ensure we have complete triples otherwise the data is corrupt. if (triples.size() % 3 == 0) { - cmState state(cmState::Role::Unknown); + cmState state(cmState::Role::Internal); rt.Backtrace = cmListFileBacktrace(); // the first entry represents the top of the trace so we need to diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 6726f63702..3f1e4e7e04 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -3049,7 +3049,7 @@ int cmcmd_cmake_ninja_dyndep(std::vector::const_iterator argBeg, auto export_info = cmDyndepCollation::ParseExportInfo(tdi); - cmake cm(cmake::CommandSet::None, cmState::Role::Unknown); + cmake cm(cmake::CommandSet::None, cmState::Role::Internal); cm.SetHomeDirectory(dir_top_src); cm.SetHomeOutputDirectory(dir_top_bld); auto ggd = cm.CreateGlobalGenerator("Ninja"); diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 3a77a1c24c..62d090197f 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -837,8 +837,8 @@ std::string cmState::RoleToString(cmState::Role mode) return "CPACK"; case Role::Help: return "HELP"; - case Role::Unknown: - return "UNKNOWN"; + case Role::Internal: + return "INTERNAL"; } return "UNKNOWN"; } diff --git a/Source/cmState.h b/Source/cmState.h index 3b9c40f88c..9a86098124 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -46,13 +46,13 @@ class cmState public: enum class Role { - Unknown, + Internal, Project, Script, FindPackage, CTest, CPack, - Help + Help, }; enum class TryCompile @@ -304,7 +304,7 @@ private: bool Ninja = false; bool NinjaMulti = false; bool FastbuildMake = false; - Role StateRole = Role::Unknown; + Role StateRole = Role::Internal; TryCompile IsTryCompile = TryCompile::No; cm::optional DependencyProvider; bool ProcessingTopLevelIncludes = false; diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index e87babb8ba..547f1d680e 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -366,7 +366,7 @@ int do_cmake(int ac, char const* const* av) cmake::CommandSet const commandSet = workingMode == cmake::SCRIPT_MODE ? cmake::CommandSet::Script : cmake::CommandSet::Project; - cmState::Role role = cmState::Role::Unknown; + cmState::Role role = cmState::Role::Internal; switch (workingMode) { case cmake::NORMAL_MODE: case cmake::HELP_MODE: @@ -1109,7 +1109,7 @@ int do_open(int ac, char const* const* av) return 1; } - cmake cm(cmake::CommandSet::None, cmState::Role::Unknown); + cmake cm(cmake::CommandSet::None, cmState::Role::Internal); cmSystemTools::SetMessageCallback( [&cm](std::string const& msg, cmMessageMetadata const& md) { cmakemainMessageCallback(msg, md, &cm); diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index b89b04d67b..e3176f7fc6 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -1150,7 +1150,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector const& args, std::cerr << "-E capabilities accepts no additional arguments\n"; return 1; } - cmake cm(cmake::CommandSet::None, cmState::Role::Unknown); + cmake cm(cmake::CommandSet::None, cmState::Role::Internal); std::cout << cm.ReportCapabilities(); return 0; } diff --git a/Tests/CMakeLib/testDebuggerVariablesHelper.cxx b/Tests/CMakeLib/testDebuggerVariablesHelper.cxx index 1a2dc2b337..a5a2a0e3f2 100644 --- a/Tests/CMakeLib/testDebuggerVariablesHelper.cxx +++ b/Tests/CMakeLib/testDebuggerVariablesHelper.cxx @@ -501,7 +501,7 @@ static bool testCreateFromFileSet() auto variablesManager = std::make_shared(); - cmake cm(cmake::CommandSet::Script, cmState::Role::Unknown); + cmake cm(cmake::CommandSet::None, cmState::Role::Internal); cmFileSet fileSet(cm, "Foo", "HEADERS", cmFileSetVisibility::Public); BT directory; directory.Value = "c:/"; @@ -545,7 +545,7 @@ static bool testCreateFromFileSets() auto variablesManager = std::make_shared(); - cmake cm(cmake::CommandSet::Script, cmState::Role::Unknown); + cmake cm(cmake::CommandSet::None, cmState::Role::Internal); cmFileSet fileSet(cm, "Foo", "HEADERS", cmFileSetVisibility::Public); BT directory; directory.Value = "c:/";