mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-05 06:40:26 -06:00
The existing cases all need to enable a language. Move this out of the `CMakeLists.txt` file and into the individual cases to make room for other cases that may not need this.
18 lines
579 B
CMake
18 lines
579 B
CMake
enable_language(CXX)
|
|
add_library(empty1 SHARED empty.cpp)
|
|
add_library(empty2 SHARED empty.cpp)
|
|
|
|
# The INTERFACE_INCLUDE_DIRECTORIES do not depend on the link interface.
|
|
# On its own, this is fine. It is only when used by empty3 that an error
|
|
# is appropriately issued.
|
|
target_link_libraries(empty1
|
|
INTERFACE
|
|
$<$<STREQUAL:$<TARGET_PROPERTY:INTERFACE_INCLUDE_DIRECTORIES>,/foo/bar>:empty2>
|
|
)
|
|
|
|
add_library(empty3 SHARED empty.cpp)
|
|
target_link_libraries(empty3 empty1)
|
|
|
|
# Suppress generator-specific targets that might pollute the stderr.
|
|
set(CMAKE_SUPPRESS_REGENERATION TRUE)
|