diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ea4185e4..fc3cb0045 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,6 +145,7 @@ IF ((CMAKE_SIZEOF_VOID_P EQUAL 8) AND lib/fusion.c t/fusion.c) SET_TARGET_PROPERTIES(test-fusion.t PROPERTIES COMPILE_FLAGS "-mavx2 -maes -mpclmul") + ADD_DEPENDENCIES(test-fusion.t generate-picotls-probes) SET(TEST_EXES ${TEST_EXES} test-fusion.t) ENDIF () diff --git a/cmake/dtrace-utils.cmake b/cmake/dtrace-utils.cmake index da566461f..191953174 100644 --- a/cmake/dtrace-utils.cmake +++ b/cmake/dtrace-utils.cmake @@ -27,10 +27,14 @@ FUNCTION (DEFINE_DTRACE_DEPENDENCIES d_file prefix) OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${prefix}-probes.h COMMAND dtrace -o ${CMAKE_CURRENT_BINARY_DIR}/${prefix}-probes.h -s ${d_file} -h DEPENDS ${d_file}) + ADD_CUSTOM_TARGET(generate-${prefix}-probes DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${prefix}-probes.h) + SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/${prefix}-probes.h PROPERTIES GENERATED TRUE) IF (DTRACE_USES_OBJFILE) ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${prefix}-probes.o COMMAND dtrace -o ${CMAKE_CURRENT_BINARY_DIR}/${prefix}-probes.o -s ${d_file} -G DEPENDS ${d_file}) + ADD_DEPENDENCIES(generate-${prefix}-probes ${CMAKE_CURRENT_BINARY_DIR}/${prefix}-probes.o) + SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/${prefix}-probes.o PROPERTIES GENERATED TRUE) ENDIF () ENDFUNCTION ()