summaryrefslogtreecommitdiffstats
path: root/Source/cmCoreTryCompile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-06-28 15:37:19 (GMT)
committerBrad King <brad.king@kitware.com>2022-07-26 19:09:48 (GMT)
commit8b0ee799e4cefd4aa008e6f251504eb541773a70 (patch)
tree00f7a60d51826f5bf55dabc3b5afd0076aa88fb1 /Source/cmCoreTryCompile.cxx
parente73c8eaff20b33452db251ce1de1b1162b647178 (diff)
downloadCMake-8b0ee799e4cefd4aa008e6f251504eb541773a70.zip
CMake-8b0ee799e4cefd4aa008e6f251504eb541773a70.tar.gz
CMake-8b0ee799e4cefd4aa008e6f251504eb541773a70.tar.bz2
cmCoreTryCompile: Compute src-file signature build directory earlier
Diffstat (limited to 'Source/cmCoreTryCompile.cxx')
-rw-r--r--Source/cmCoreTryCompile.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index 63184a0..8d41f00 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -408,6 +408,11 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
this->BinaryDirectory.clear();
return -1;
}
+ // compute the binary dir when TRY_COMPILE is called with a src file
+ // signature
+ if (this->SrcFileSignature) {
+ this->BinaryDirectory += "/CMakeFiles/CMakeTmp";
+ }
} else {
this->Makefile->IssueMessage(MessageType::FATAL_ERROR,
"No <bindir> specified.");
@@ -448,6 +453,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
return -1;
}
+ // only valid for srcfile signatures
if (!this->SrcFileSignature) {
if (!cState.Validate(this->Makefile)) {
return -1;
@@ -467,14 +473,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
if (!objcxxState.Validate(this->Makefile)) {
return -1;
}
- }
- // compute the binary dir when TRY_COMPILE is called with a src file
- // signature
- if (this->SrcFileSignature) {
- this->BinaryDirectory += "/CMakeFiles/CMakeTmp";
- } else {
- // only valid for srcfile signatures
if (!compileDefs.empty()) {
this->Makefile->IssueMessage(
MessageType::FATAL_ERROR,