diff options
author | Brad King <brad.king@kitware.com> | 2022-07-29 18:56:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-08-02 12:04:21 (GMT) |
commit | 067ba3a2bd1ce168b2867de74d2ea6b944a936fc (patch) | |
tree | 8a8cdfb134a09085495488059e1bb1ece246589c /Source/cmTryRunCommand.cxx | |
parent | 781e1b191a812e3f808ce272baaaa0689d30d953 (diff) | |
download | CMake-067ba3a2bd1ce168b2867de74d2ea6b944a936fc.zip CMake-067ba3a2bd1ce168b2867de74d2ea6b944a936fc.tar.gz CMake-067ba3a2bd1ce168b2867de74d2ea6b944a936fc.tar.bz2 |
cmCoreTryCompile: Move target type selection logic to try_compile
This is specific to `try_compile` since `try_run` always needs an
executable. Move the logic out of the common code path.
Diffstat (limited to 'Source/cmTryRunCommand.cxx')
-rw-r--r-- | Source/cmTryRunCommand.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx index b42a6ce..2cf75e2 100644 --- a/Source/cmTryRunCommand.cxx +++ b/Source/cmTryRunCommand.cxx @@ -192,7 +192,7 @@ bool TryRunCommandImpl::TryRunCode(std::vector<std::string> const& argv) this->CompileResultVariable = argv[1]; // do the try compile - bool compiled = this->TryCompileCode(tryCompile, true); + bool compiled = this->TryCompileCode(tryCompile, cmStateEnums::EXECUTABLE); // now try running the command if it compiled if (compiled) { |