CMake/Tests/ExportImport/Import/CMakeLists.txt
Brad King d1aa17a7b0 ENH: Remove CMAKE_ANSI_CFLAGS from tests
As of CMake 2.6 this variable is not defined, and the ANSI flags for the
HP compiler are simply hard-coded in the default C flags.
2009-07-08 11:41:48 -04:00

20 lines
687 B
CMake

cmake_minimum_required (VERSION 2.6)
project(Import C)
# 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)