2
0
mirror of https://github.com/boostorg/process.git synced 2026-01-19 04:22:15 +00:00

target_link_Libraries signature fix

This commit is contained in:
Klemens Morgenstern
2025-10-09 21:25:32 +08:00
parent 01c9a5b60f
commit 9df0ee099b

View File

@@ -2,7 +2,7 @@ enable_testing()
function(boost_process_v2_standalone_test name)
add_executable(boost_process_v2_${name} ${name}.cpp test_impl.cpp)
target_link_libraries(boost_process_v2_${name} Boost::process Boost::system Boost::filesystem Boost::unit_test_framework )
target_link_libraries(boost_process_v2_${name} PUBLIC Boost::process Boost::system Boost::filesystem Boost::unit_test_framework )
if (WIN32)
target_compile_definitions(boost_process_v2_${name} PUBLIC WIN32_LEAN_AND_MEAN=1)
target_link_libraries(boost_process_v2_${name} PUBLIC Ntdll)
@@ -21,12 +21,15 @@ target_link_libraries(boost_process_v2_test_target PUBLIC Boost::process Boost::
function(boost_process_v2_test_with_target name)
add_executable(boost_process_v2_${name} ${name}.cpp)
target_link_libraries(boost_process_v2_${name} Boost::process Boost::system Boost::filesystem boost_process_v2_test_impl)
target_link_libraries(boost_process_v2_${name} PUBLIC Boost::process Boost::system Boost::filesystem boost_process_v2_test_impl)
if (WIN32)
target_compile_definitions(boost_process_v2_${name} PUBLIC WIN32_LEAN_AND_MEAN=1)
target_link_libraries(boost_process_v2_${name} PUBLIC Ntdll)
endif()
add_dependencies(boost_process_v2_${name} boost_process_v2_test_target)
add_test(NAME boost_process_v2_${name} COMMAND $<TARGET_FILE:boost_process_v2_${name}>
-- $<TARGET_FILE:boost_process_v2_test_target>)
endfunction()
boost_process_v2_test_with_target(process)