diff options
Diffstat (limited to 'Tests/RunCMake/add_dependencies/RetrieveDependencies.cmake')
-rw-r--r-- | Tests/RunCMake/add_dependencies/RetrieveDependencies.cmake | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/RunCMake/add_dependencies/RetrieveDependencies.cmake b/Tests/RunCMake/add_dependencies/RetrieveDependencies.cmake new file mode 100644 index 0000000..45b3974 --- /dev/null +++ b/Tests/RunCMake/add_dependencies/RetrieveDependencies.cmake @@ -0,0 +1,16 @@ +cmake_minimum_required(VERSION 3.7) +project(RetrieveDependencies C) + +add_library(a a.c) + +add_library(b c.c) +target_link_libraries(a b) + +add_library(c c.c) +add_dependencies(a c) + +get_property(DEPS_A TARGET a PROPERTY MANUALLY_ADDED_DEPENDENCIES) + +if(NOT DEPS_A STREQUAL "c") + message(FATAL_ERROR "Expected target c being a dependency of a but got: '${DEPS_A}'") +endif() |