2009-07-10 21:53:38 +04:00
|
|
|
cmake_minimum_required(VERSION 2.7.20090708)
|
|
|
|
project(LinkLanguage C CXX)
|
|
|
|
|
|
|
|
add_library(foo STATIC foo.cxx)
|
|
|
|
add_executable(LinkLanguage LinkLanguage.c)
|
2009-10-10 00:11:47 +04:00
|
|
|
|
|
|
|
# Export the target now to compute its link interface and implementation.
|
|
|
|
# This tests that the link info is recomputed after the library is linked.
|
|
|
|
export(TARGETS LinkLanguage FILE LinkLanguageTargets.cmake)
|
|
|
|
|
2009-07-10 21:53:38 +04:00
|
|
|
target_link_libraries(LinkLanguage foo)
|
|
|
|
|
|
|
|
# CMake should now automatically choose CXX for linking, so we need
|
|
|
|
# not set the property:
|
|
|
|
#set_property(TARGET LinkLanguage PROPERTY LINKER_LANGUAGE CXX)
|