From aac542f2f160e133e8d43fa665a8b1ebbf90f106 Mon Sep 17 00:00:00 2001 From: Matthew Woehlke Date: Wed, 21 Sep 2022 15:38:06 -0400 Subject: try_run: Remove PROJECT support Remove PROJECT support from try_run; it was never tested, has never been documented, and it's unclear how it should even work (since CMake wouldn't know what executable to run). --- Source/cmCoreTryCompile.cxx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index 2f63b3c..c45f989 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 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; } -- cgit v0.12