CMP0022-NOWARN-static-NEW.cmake 476 B

123456789101112
  1. enable_language(CXX)
  2. add_library(foo STATIC empty_vs6_1.cpp)
  3. add_library(bar STATIC empty_vs6_2.cpp)
  4. add_library(bat STATIC empty_vs6_3.cpp)
  5. target_link_libraries(foo bar)
  6. # The last element here needs to contain a space so that it is a single
  7. # element which is not a valid target name. As bar is a STATIC library,
  8. # this tests that the LINK_ONLY generator expression is not used for
  9. # that element, creating an error.
  10. target_link_libraries(bar LINK_PRIVATE bat "-lz -lm")