diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-08-21 06:55:30 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-08-26 15:37:00 (GMT) |
commit | cc8f79670e6c6533a76b80656c87342c0c1696a4 (patch) | |
tree | b2cbe12515525eec33698f2e33e698d3cd745aed /Tests/ExportImport/Import | |
parent | fd4fb9ef040dde7961500e2241b43909a9e6b1a4 (diff) | |
download | CMake-cc8f79670e6c6533a76b80656c87342c0c1696a4.zip CMake-cc8f79670e6c6533a76b80656c87342c0c1696a4.tar.gz CMake-cc8f79670e6c6533a76b80656c87342c0c1696a4.tar.bz2 |
try_compile: Extract IMPORTED targets from INTERFACE_LINK_LIBRARIES
Diffstat (limited to 'Tests/ExportImport/Import')
-rw-r--r-- | Tests/ExportImport/Import/try_compile/CMakeLists.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Tests/ExportImport/Import/try_compile/CMakeLists.txt b/Tests/ExportImport/Import/try_compile/CMakeLists.txt index 0e57c17..1088461 100644 --- a/Tests/ExportImport/Import/try_compile/CMakeLists.txt +++ b/Tests/ExportImport/Import/try_compile/CMakeLists.txt @@ -19,3 +19,18 @@ int main(int argc, char **argv) if(NOT SHARED_LIB_DEPENDS) message(SEND_ERROR "try_compile with IMPORTED targets failed!\n\n${OUTPUT}") endif() + +set(CMAKE_REQUIRED_LIBRARIES Req::testSharedLibRequiredUser2) +check_cxx_source_compiles( + " +#include \"testSharedLibRequiredUser2.h\" +int main(int argc, char **argv) +{ + TestSharedLibRequiredUser2 user; + return user.foo().foo(); +} +" SHARED_LIB_DEPENDS2) + +if(NOT SHARED_LIB_DEPENDS2) + message(SEND_ERROR "try_compile with IMPORTED targets failed!\n\n${OUTPUT}") +endif() |