diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmCoreTryCompile.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index 3ef62a0..7e7f8d2 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -192,9 +192,6 @@ auto const TryCompileOldArgParser = .Bind(4, &Arguments::TargetName) /* keep semicolon on own line */; -auto const TryRunProjectArgParser = - makeTryRunParser(TryCompileBaseProjectArgParser); - auto const TryRunSourcesArgParser = makeTryRunParser(TryCompileBaseNonProjectArgParser); @@ -226,11 +223,10 @@ Arguments cmCoreTryCompile::ParseArgs( std::vector<std::string> unparsedArguments; const auto& second = *(++args.begin()); - if (second == "PROJECT") { - // New PROJECT signature. - auto arguments = this->ParseArgs( - args, isTryRun ? TryRunProjectArgParser : TryCompileProjectArgParser, - unparsedArguments); + if (!isTryRun && second == "PROJECT") { + // New PROJECT signature (try_compile only). + auto arguments = + this->ParseArgs(args, TryCompileProjectArgParser, unparsedArguments); if (!arguments.BinaryDirectory) { arguments.BinaryDirectory = unique_binary_directory; } |