Followup question to this question: cmake project build only one specific executable (and its dependencies)
I have a custom target written so it will run every time i compile something in my project. Now that I call an explicit target as asked in the question above, this custom command does not get executed anymore. Code:
add_custom_target(
custom_command
ALL
DEPENDS hash.h
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "[INFO] CMake generating special *.h file from custom command magic."
)
I already tried removing the ALL
directive but it did not change anything.
Forgot to add: I am using cmake/3.13.4
compiled from source.