summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/add_subdirectory/ExcludeFromAll.cmake
blob: 16f39d91bf0117190c4b3ed1770fcb8f83e60436 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
enable_language(CXX)

add_subdirectory(ExcludeFromAll EXCLUDE_FROM_ALL)

add_executable(main main.cpp)
target_link_libraries(main PRIVATE foo)

file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/check-$<LOWER_CASE:$<CONFIG>>.cmake CONTENT "
set(main_exe \"$<TARGET_FILE:main>\")
set(foo_lib \"$<TARGET_FILE:foo>\")
set(bar_lib \"$<TARGET_FILE:bar>\")
set(subinc_lib \"$<TARGET_FILE:subinc>\")
")