cmake/Tests/RunCMake/BuildDepends/MakeInProjectOnly.cmake

17 lines
549 B
CMake
Raw Normal View History

2016-07-09 11:21:54 +02:00
enable_language(C)
get_filename_component(include_dir "${CMAKE_BINARY_DIR}" PATH)
include_directories("${include_dir}")
add_executable(MakeInProjectOnly MakeInProjectOnly.c)
set(CMAKE_DEPENDS_IN_PROJECT_ONLY 1)
2018-01-26 17:06:56 +01:00
file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/check-$<LOWER_CASE:$<CONFIG>>.cmake CONTENT "
2016-07-09 11:21:54 +02:00
if (check_step EQUAL 1)
set(check_pairs
\"$<TARGET_FILE:MakeInProjectOnly>|${include_dir}/MakeInProjectOnly.h\"
)
else()
set(check_pairs
\"${include_dir}/MakeInProjectOnly.h|\$<TARGET_FILE:MakeInProjectOnly>\"
)
endif()
")