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 /Modules/Internal | |
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 'Modules/Internal')
-rw-r--r-- | Modules/Internal/CheckSourceRuns.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/Internal/CheckSourceRuns.cmake b/Modules/Internal/CheckSourceRuns.cmake index c667245..3a4b758 100644 --- a/Modules/Internal/CheckSourceRuns.cmake +++ b/Modules/Internal/CheckSourceRuns.cmake @@ -51,7 +51,12 @@ function(CMAKE_CHECK_SOURCE_RUNS _lang _source _var) set(_SRC_EXT "${arg}") set(_key "") else() - message(FATAL_ERROR "Unknown argument:\n ${arg}\n") + set(message_type FATAL_ERROR) + if (_CheckSourceRuns_old_signature) + set(message_type AUTHOR_WARNING) + endif () + message("${message_type}" "Unknown argument:\n ${arg}\n") + unset(message_type) endif() endforeach() |