Skip to content

Commit 9df0ee0

Browse files
target_link_Libraries signature fix
1 parent 01c9a5b commit 9df0ee0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/v2/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ enable_testing()
22

33
function(boost_process_v2_standalone_test name)
44
add_executable(boost_process_v2_${name} ${name}.cpp test_impl.cpp)
5-
target_link_libraries(boost_process_v2_${name} Boost::process Boost::system Boost::filesystem Boost::unit_test_framework )
5+
target_link_libraries(boost_process_v2_${name} PUBLIC Boost::process Boost::system Boost::filesystem Boost::unit_test_framework )
66
if (WIN32)
77
target_compile_definitions(boost_process_v2_${name} PUBLIC WIN32_LEAN_AND_MEAN=1)
88
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::
2121

2222
function(boost_process_v2_test_with_target name)
2323
add_executable(boost_process_v2_${name} ${name}.cpp)
24-
target_link_libraries(boost_process_v2_${name} Boost::process Boost::system Boost::filesystem boost_process_v2_test_impl)
24+
target_link_libraries(boost_process_v2_${name} PUBLIC Boost::process Boost::system Boost::filesystem boost_process_v2_test_impl)
25+
if (WIN32)
26+
target_compile_definitions(boost_process_v2_${name} PUBLIC WIN32_LEAN_AND_MEAN=1)
27+
target_link_libraries(boost_process_v2_${name} PUBLIC Ntdll)
28+
endif()
2529
add_dependencies(boost_process_v2_${name} boost_process_v2_test_target)
2630
add_test(NAME boost_process_v2_${name} COMMAND $<TARGET_FILE:boost_process_v2_${name}>
2731
-- $<TARGET_FILE:boost_process_v2_test_target>)
2832

29-
3033
endfunction()
3134

3235
boost_process_v2_test_with_target(process)

0 commit comments

Comments
 (0)