diff options
author | Brad King <brad.king@kitware.com> | 2020-05-25 14:58:54 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-05-25 14:59:01 (GMT) |
commit | a354b7f21e858728606ddc7c275bad35914d8eaa (patch) | |
tree | 3766fcf93b02ebbe0ecc48bbce0f7e99258850d5 /Tests/RunCMake/CheckLinkerFlag/CheckLinkerFlag.cmake | |
parent | b82bdbf44aeef29ba7b266989f1557a0ffcaa969 (diff) | |
parent | af96c0f4faf5bf9f4a4dbc958b09a1dfc58dab38 (diff) | |
download | CMake-a354b7f21e858728606ddc7c275bad35914d8eaa.zip CMake-a354b7f21e858728606ddc7c275bad35914d8eaa.tar.gz CMake-a354b7f21e858728606ddc7c275bad35914d8eaa.tar.bz2 |
Merge topic 'CheckLinkerFlag-module'
af96c0f4fa CheckLinkerFlag: Add module to check validity of linker flags
3c4cc77d55 Tests: Extend Fortran compiler information
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4777
Diffstat (limited to 'Tests/RunCMake/CheckLinkerFlag/CheckLinkerFlag.cmake')
-rw-r--r-- | Tests/RunCMake/CheckLinkerFlag/CheckLinkerFlag.cmake | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/RunCMake/CheckLinkerFlag/CheckLinkerFlag.cmake b/Tests/RunCMake/CheckLinkerFlag/CheckLinkerFlag.cmake new file mode 100644 index 0000000..c3bd465 --- /dev/null +++ b/Tests/RunCMake/CheckLinkerFlag/CheckLinkerFlag.cmake @@ -0,0 +1,14 @@ + +enable_language (${CHECK_LANGUAGE}) + +include(CheckLinkerFlag) + +check_linker_flag(${CHECK_LANGUAGE} "LINKER:-L,/dir" VALID_LINKER_FLAG) +if(NOT VALID_LINKER_FLAG) + message(SEND_ERROR "Test fail for valid linker flag.") +endif() + +check_linker_flag(${CHECK_LANGUAGE} "LINKER:-D" INVALID_LINKER_FLAG) +if(INVALID_LINKER_FLAG) + message(SEND_ERROR "Test fail for invalid linker flag.") +endif() |