summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CheckLinkerFlag/CheckLinkerFlag.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/CheckLinkerFlag/CheckLinkerFlag.cmake')
-rw-r--r--Tests/RunCMake/CheckLinkerFlag/CheckLinkerFlag.cmake14
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()