CMP0022-NOWARN-static-NEW.cmake 521 B

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