Skip to content

Commit

Permalink
Add more explicit echo and run copy command only on build
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilDohne committed Mar 8, 2024
1 parent 3b29fd9 commit f9c42c3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions PhotoshopTest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@ endif()
target_link_libraries(PhotoshopTest PRIVATE PhotoshopAPI doctest)

# If someone finds a way to make this work with just doctest that would be great
add_test(NAME PhotoshopTest COMMAND PhotoshopTest)
add_test(NAME TestPhotoshopAPI COMMAND PhotoshopTest)


# Copy the documents/ folder to the build dir to run the tests
message("Copying test files to output directory...")
add_custom_command(TARGET PhotoshopTest POST_BUILD
MAIN_DEPENDENCY PhotoshopTest
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_SOURCE_DIR}/documents/ $<TARGET_FILE_DIR:PhotoshopTest>/documents)
message("Finished copying test files to output directory")
add_custom_command(TARGET PhotoshopTest POST_BUILD
MAIN_DEPENDENCY PhotoshopTest
COMMAND ${CMAKE_COMMAND} -E echo
"Finished copying test files to output directory $<TARGET_FILE_DIR:PhotoshopTest>/documents")

0 comments on commit f9c42c3

Please sign in to comment.