diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2020-10-26 12:13:58 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2020-10-28 19:06:02 (GMT) |
commit | a524bf3aa712a783e24e9307cf8915310fb8613a (patch) | |
tree | 15b83ce8d536478f37c5156294f17d7a04fff27e /Tests/RunCMake/CheckSourceRuns | |
parent | 96ea613f169cedc4087b536d95ca6c128b8f4eb6 (diff) | |
download | CMake-a524bf3aa712a783e24e9307cf8915310fb8613a.zip CMake-a524bf3aa712a783e24e9307cf8915310fb8613a.tar.gz CMake-a524bf3aa712a783e24e9307cf8915310fb8613a.tar.bz2 |
CheckSourceRuns: do not fail on unrecognized arguments
The old `check_X_source_runs` modules did not verify the arguments, so
we cannot start doing it now. Downgrade the hard error introduced in
commit 357e2ef429 (CheckSoureRuns: Add a unified way to check if a
source runs, 2020-09-14) via !5223 into a noisy warning.
Diffstat (limited to 'Tests/RunCMake/CheckSourceRuns')
-rw-r--r-- | Tests/RunCMake/CheckSourceRuns/UnknownArgument-stderr.txt | 15 | ||||
-rw-r--r-- | Tests/RunCMake/CheckSourceRuns/UnknownArgument.cmake | 4 |
2 files changed, 17 insertions, 2 deletions
diff --git a/Tests/RunCMake/CheckSourceRuns/UnknownArgument-stderr.txt b/Tests/RunCMake/CheckSourceRuns/UnknownArgument-stderr.txt index 9b576b5..6824e72 100644 --- a/Tests/RunCMake/CheckSourceRuns/UnknownArgument-stderr.txt +++ b/Tests/RunCMake/CheckSourceRuns/UnknownArgument-stderr.txt @@ -1,4 +1,17 @@ -^CMake Error at [^ +^CMake Warning \(dev\) at [^ +]*/Modules/Internal/CheckSourceRuns.cmake:[0-9]+ \(message\): + Unknown argument: + + BAD + +Call Stack \(most recent call first\): + [^ +]*/Modules/CheckCSourceRuns.cmake:[0-9]+ \(cmake_check_source_runs\) + UnknownArgument.cmake:[0-9]+ \(check_c_source_runs\) + CMakeLists.txt:[0-9]+ \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. + +CMake Error at [^ ]*/Modules/Internal/CheckSourceRuns.cmake:[0-9]+ \(message\): Unknown argument: diff --git a/Tests/RunCMake/CheckSourceRuns/UnknownArgument.cmake b/Tests/RunCMake/CheckSourceRuns/UnknownArgument.cmake index 6e50fa7..927a6b0 100644 --- a/Tests/RunCMake/CheckSourceRuns/UnknownArgument.cmake +++ b/Tests/RunCMake/CheckSourceRuns/UnknownArgument.cmake @@ -1,5 +1,7 @@ enable_language (C) +include(CheckCSourceRuns) include(CheckSourceRuns) -check_source_runs(C "int main() {return 0;}" SHOULD_BUILD SRC_EXT C BAD) +check_c_source_runs("int main() {return 0;}" C_SHOULD_BUILD BAD) +check_source_runs(C "int main() {return 0;}" SHOULD_BUILD SRC_EXT c BAD) |