Skip to content

Commit

Permalink
Solve issue with config test in windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga committed Jan 23, 2024
1 parent 6966027 commit 904bbee
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@ add_test(NAME ${target}
COMMAND $<TARGET_FILE:${target}>
)

if(WIN32)
# Windows requires metacall to be in the same folder as the executable in order to run the test properly
add_custom_command(TARGET ${target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:metacall> ${CONFIGURATION_DEFAULT_OUTPUT_DIRECTORY}
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:rapid_json_serial> ${CONFIGURATION_DEFAULT_OUTPUT_DIRECTORY}
)
endif()

#
# Define test properties
#
Expand Down

0 comments on commit 904bbee

Please sign in to comment.