2009-07-11 18:10:51 +04:00
|
|
|
cmake_minimum_required (VERSION 2.7.20090711)
|
|
|
|
project(Import C CXX)
|
2008-01-28 16:40:21 +03:00
|
|
|
|
2009-04-06 19:11:33 +04:00
|
|
|
# Import everything in a subdirectory.
|
|
|
|
add_subdirectory(A)
|
|
|
|
|
|
|
|
# Make sure the imported targets are scoped inside the subdirectory.
|
|
|
|
if(TARGET exp_testLib2)
|
|
|
|
message(FATAL_ERROR "Imported target exp_testLib2 is not scoped in subdir!")
|
|
|
|
endif()
|
|
|
|
if(TARGET bld_testLib2)
|
|
|
|
message(FATAL_ERROR "Imported target bld_testLib2 is not scoped in subdir!")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# Test transitive linking to a target imported in the subdirectory.
|
|
|
|
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)
|
2013-02-09 13:34:37 +04:00
|
|
|
|
|
|
|
add_subdirectory(try_compile)
|
2012-11-20 13:58:15 +04:00
|
|
|
|
|
|
|
# Test package INTERFACE controls
|
|
|
|
add_subdirectory(Interface)
|