Skip to content

Commit

Permalink
Improve add_boost_test CMake function
Browse files Browse the repository at this point in the history
  • Loading branch information
flomnes committed Jan 2, 2025
1 parent 832e89b commit d9d996b
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/tests/macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function(add_boost_test)
set(options "")
set(oneValueArgs)
set(multiValueArgs SRC LIBS INCLUDE)
cmake_parse_arguments(PARSE_ARGV 0 arg
cmake_parse_arguments(PARSE_ARGV 1 arg
"${options}" "${oneValueArgs}" "${multiValueArgs}")
# Bypass cmake_parse_arguments for the 1st argument
set(TEST_NAME ${ARGV0})
Expand All @@ -29,10 +29,4 @@ function(add_boost_test)

# Give the IDE some directions to display tests in a "Unit-tests" folder
set_target_properties(${TEST_NAME} PROPERTIES FOLDER Unit-tests)

# Linux only. TODO remove ?
if(UNIX AND NOT APPLE)
target_link_libraries(${TEST_NAME} PRIVATE stdc++fs)
endif()

endfunction()

0 comments on commit d9d996b

Please sign in to comment.