mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-21 23:00:50 +08:00
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).
This commit is contained in:
@@ -192,9 +192,6 @@ auto const TryCompileOldArgParser =
|
|||||||
.Bind(4, &Arguments::TargetName)
|
.Bind(4, &Arguments::TargetName)
|
||||||
/* keep semicolon on own line */;
|
/* keep semicolon on own line */;
|
||||||
|
|
||||||
auto const TryRunProjectArgParser =
|
|
||||||
makeTryRunParser(TryCompileBaseProjectArgParser);
|
|
||||||
|
|
||||||
auto const TryRunSourcesArgParser =
|
auto const TryRunSourcesArgParser =
|
||||||
makeTryRunParser(TryCompileBaseNonProjectArgParser);
|
makeTryRunParser(TryCompileBaseNonProjectArgParser);
|
||||||
|
|
||||||
@@ -226,11 +223,10 @@ Arguments cmCoreTryCompile::ParseArgs(
|
|||||||
std::vector<std::string> unparsedArguments;
|
std::vector<std::string> unparsedArguments;
|
||||||
const auto& second = *(++args.begin());
|
const auto& second = *(++args.begin());
|
||||||
|
|
||||||
if (second == "PROJECT") {
|
if (!isTryRun && second == "PROJECT") {
|
||||||
// New PROJECT signature.
|
// New PROJECT signature (try_compile only).
|
||||||
auto arguments = this->ParseArgs(
|
auto arguments =
|
||||||
args, isTryRun ? TryRunProjectArgParser : TryCompileProjectArgParser,
|
this->ParseArgs(args, TryCompileProjectArgParser, unparsedArguments);
|
||||||
unparsedArguments);
|
|
||||||
if (!arguments.BinaryDirectory) {
|
if (!arguments.BinaryDirectory) {
|
||||||
arguments.BinaryDirectory = unique_binary_directory;
|
arguments.BinaryDirectory = unique_binary_directory;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user