summaryrefslogtreecommitdiffstats
path: root/Source/cmTryCompileCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTryCompileCommand.cxx')
-rw-r--r--Source/cmTryCompileCommand.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmTryCompileCommand.cxx b/Source/cmTryCompileCommand.cxx
index c70c03e..ebbb4f2 100644
--- a/Source/cmTryCompileCommand.cxx
+++ b/Source/cmTryCompileCommand.cxx
@@ -81,14 +81,15 @@ bool cmTryCompileCommand(std::vector<std::string> const& args,
return true;
}
- if (cm::optional<cmTryCompileResult> compileResult =
- tc.TryCompileCode(arguments, targetType)) {
+ cm::optional<cmTryCompileResult> compileResult =
+ tc.TryCompileCode(arguments, targetType);
#ifndef CMAKE_BOOTSTRAP
+ if (compileResult && !arguments.NoLog) {
if (cmConfigureLog* log = mf.GetCMakeInstance()->GetConfigureLog()) {
WriteTryCompileEvent(*log, mf, *compileResult);
}
-#endif
}
+#endif
// if They specified clean then we clean up what we can
if (tc.SrcFileSignature) {