diff options
author | Brad King <brad.king@kitware.com> | 2013-02-25 18:12:02 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-02-25 18:12:02 (GMT) |
commit | b887bca6ee3651857be663fe1f2e2f2c1ed1ac1e (patch) | |
tree | 26a9d0ed2226fa86be6cbffe6ffbbd661c6a40b1 /Tests | |
parent | 6e567cabea8df6f8fc8c401f4b9bfe2997c4399e (diff) | |
parent | 236133e79e2d047810eeba90915e38d9861e2a22 (diff) | |
download | CMake-b887bca6ee3651857be663fe1f2e2f2c1ed1ac1e.zip CMake-b887bca6ee3651857be663fe1f2e2f2c1ed1ac1e.tar.gz CMake-b887bca6ee3651857be663fe1f2e2f2c1ed1ac1e.tar.bz2 |
Merge topic 'try_compile-targets'
236133e Handle targets in the LINK_LIBRARIES of try_compile.
1c0597c Add a new Export generator for IMPORTED targets.
f2ab17d Keep track of all targets seen while evaluating a genex.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/ExportImport/Import/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/ExportImport/Import/try_compile/CMakeLists.txt | 21 |
2 files changed, 23 insertions, 0 deletions
diff --git a/Tests/ExportImport/Import/CMakeLists.txt b/Tests/ExportImport/Import/CMakeLists.txt index 3fc78a2..9c2d597 100644 --- a/Tests/ExportImport/Import/CMakeLists.txt +++ b/Tests/ExportImport/Import/CMakeLists.txt @@ -17,3 +17,5 @@ add_executable(imp_testTransExe1 imp_testTransExe1.c) target_link_libraries(imp_testTransExe1 imp_lib1) add_executable(imp_testTransExe1b imp_testTransExe1.c) target_link_libraries(imp_testTransExe1b imp_lib1b) + +add_subdirectory(try_compile) diff --git a/Tests/ExportImport/Import/try_compile/CMakeLists.txt b/Tests/ExportImport/Import/try_compile/CMakeLists.txt new file mode 100644 index 0000000..5600dff --- /dev/null +++ b/Tests/ExportImport/Import/try_compile/CMakeLists.txt @@ -0,0 +1,21 @@ + +cmake_minimum_required(VERSION 2.8) + +find_package(testLibRequired 2.5 REQUIRED) + +include(CheckCXXSourceCompiles) + +set(CMAKE_REQUIRED_LIBRARIES Req::testSharedLibRequired) +check_cxx_source_compiles( + " +#include \"testSharedLibRequired.h\" +int main(int argc, char **argv) +{ + TestSharedLibRequired req; + return req.foo(); +} +" SHARED_LIB_REQUIRED) + +if(NOT SHARED_LIB_REQUIRED) + message(SEND_ERROR "try_compile with IMPORTED targets failed!\n\n${OUTPUT}") +endif() |