summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-07-02 18:23:38 (GMT)
committerBrad King <brad.king@kitware.com>2021-07-12 16:21:52 (GMT)
commit6c440ea3ce36d4c5b1629f111f376e809c7e99b2 (patch)
treee25d3289140a86f185698631e6082ba1991c597e /Source/cmMakefile.cxx
parent2065bd73cb6a9a3bc463c5bb0dc6877433782973 (diff)
downloadCMake-6c440ea3ce36d4c5b1629f111f376e809c7e99b2.zip
CMake-6c440ea3ce36d4c5b1629f111f376e809c7e99b2.tar.gz
CMake-6c440ea3ce36d4c5b1629f111f376e809c7e99b2.tar.bz2
cmake: Model normal and try-compile project kinds explicitly
Construct with the project kind instead of mutating state after construction.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 7ac5113..6d477a7 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3567,8 +3567,8 @@ int cmMakefile::TryCompile(const std::string& srcdir,
// make sure the same generator is used
// use this program as the cmake to be run, it should not
// be run that way but the cmake object requires a vailid path
- cmake cm(cmake::RoleProject, cmState::Project);
- cm.SetIsInTryCompile(true);
+ cmake cm(cmake::RoleProject, cmState::Project,
+ cmState::ProjectKind::TryCompile);
auto gg = cm.CreateGlobalGenerator(this->GetGlobalGenerator()->GetName());
if (!gg) {
this->IssueMessage(MessageType::INTERNAL_ERROR,