You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
575 B
16 lines
575 B
13 years ago
|
enable_language(CXX)
|
||
|
add_library(A OBJECT a.cxx)
|
||
|
add_library(B STATIC a.c $<TARGET_OBJECTS:A>)
|
||
|
|
||
|
# Verify that object library languages are propagated.
|
||
|
export(TARGETS B NAMESPACE Exp FILE BExport.cmake)
|
||
|
include(${CMAKE_CURRENT_BINARY_DIR}/BExport.cmake)
|
||
|
get_property(configs TARGET ExpB PROPERTY IMPORTED_CONFIGURATIONS)
|
||
|
foreach(c ${configs})
|
||
|
get_property(langs TARGET ExpB PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES_${c})
|
||
|
list(FIND langs CXX pos)
|
||
|
if(${pos} LESS 0)
|
||
|
message(FATAL_ERROR "Target export does not list object library languages.")
|
||
|
endif()
|
||
|
endforeach()
|