Skip to content

Commit

Permalink
moved header dep globbing outside of custom command
Browse files Browse the repository at this point in the history
PR ipkn#284 JamesWP
  • Loading branch information
rustyx committed Feb 8, 2019
1 parent e65c970 commit 3c3a4c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,13 @@ else()

file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/amalgamate)

file(GLOB SRC_HEADER_FILES ${PROJECT_SOURCE_DIR}/include/*.h ${PROJECT_SOURCE_DIR}/include/crow/*.h)

add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/amalgamate/crow_all.h
COMMAND python ${PROJECT_SOURCE_DIR}/amalgamate/merge_all.py ${PROJECT_SOURCE_DIR}/include
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/amalgamate/crow_all.h ${PROJECT_SOURCE_DIR}/amalgamate
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/amalgamate
DEPENDS ${PROJECT_SOURCE_DIR}/include/*.h ${PROJECT_SOURCE_DIR}/include/crow/*.h
DEPENDS ${SRC_HEADER_FILES}
)

add_custom_target(amalgamation ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/amalgamate/crow_all.h)
Expand Down

0 comments on commit 3c3a4c2

Please sign in to comment.