CMakeLists.txt 558 B

123456789101112131415
  1. cmake_minimum_required(VERSION 2.7.20090708)
  2. project(LinkLanguage C CXX)
  3. add_library(foo STATIC foo.cxx)
  4. add_executable(LinkLanguage LinkLanguage.c)
  5. # Export the target now to compute its link interface and implementation.
  6. # This tests that the link info is recomputed after the library is linked.
  7. export(TARGETS LinkLanguage FILE LinkLanguageTargets.cmake)
  8. target_link_libraries(LinkLanguage foo)
  9. # CMake should now automatically choose CXX for linking, so we need
  10. # not set the property:
  11. #set_property(TARGET LinkLanguage PROPERTY LINKER_LANGUAGE CXX)