diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/try_run/BadLinkLibraries-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/try_run/BadLinkLibraries-stderr.txt | 5 | ||||
-rw-r--r-- | Tests/RunCMake/try_run/BadLinkLibraries.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/try_run/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/RunCMake/try_run/RunCMakeTest.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/try_run/src.c | 1 |
7 files changed, 18 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index b5e41d9..78d375e 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -130,6 +130,7 @@ add_RunCMake_test(project) add_RunCMake_test(return) add_RunCMake_test(string) add_RunCMake_test(try_compile) +add_RunCMake_test(try_run) add_RunCMake_test(set) add_RunCMake_test(variable_watch) add_RunCMake_test(CMP0004) diff --git a/Tests/RunCMake/try_run/BadLinkLibraries-result.txt b/Tests/RunCMake/try_run/BadLinkLibraries-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/try_run/BadLinkLibraries-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/try_run/BadLinkLibraries-stderr.txt b/Tests/RunCMake/try_run/BadLinkLibraries-stderr.txt new file mode 100644 index 0000000..dcd1bfc --- /dev/null +++ b/Tests/RunCMake/try_run/BadLinkLibraries-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at BadLinkLibraries.cmake:2 \(try_run\): + Only libraries may be used as try_compile or try_run IMPORTED + LINK_LIBRARIES. Got not_a_library of type UTILITY. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/try_run/BadLinkLibraries.cmake b/Tests/RunCMake/try_run/BadLinkLibraries.cmake new file mode 100644 index 0000000..a124bf6 --- /dev/null +++ b/Tests/RunCMake/try_run/BadLinkLibraries.cmake @@ -0,0 +1,4 @@ +add_custom_target(not_a_library) +try_run(RUN_RESULT COMPILE_RESULT + ${CMAKE_CURRENT_BINARY_DIR}/CMakeTmp ${CMAKE_CURRENT_SOURCE_DIR}/src.c + LINK_LIBRARIES not_a_library) diff --git a/Tests/RunCMake/try_run/CMakeLists.txt b/Tests/RunCMake/try_run/CMakeLists.txt new file mode 100644 index 0000000..e034780 --- /dev/null +++ b/Tests/RunCMake/try_run/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 2.8.0) +project(${RunCMake_TEST} C) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/try_run/RunCMakeTest.cmake b/Tests/RunCMake/try_run/RunCMakeTest.cmake new file mode 100644 index 0000000..1ec9a55 --- /dev/null +++ b/Tests/RunCMake/try_run/RunCMakeTest.cmake @@ -0,0 +1,3 @@ +include(RunCMake) + +run_cmake(BadLinkLibraries) diff --git a/Tests/RunCMake/try_run/src.c b/Tests/RunCMake/try_run/src.c new file mode 100644 index 0000000..78f2de1 --- /dev/null +++ b/Tests/RunCMake/try_run/src.c @@ -0,0 +1 @@ +int main(void) { return 0; } |