Skip to content

Commit

Permalink
create dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuho committed May 14, 2020
1 parent 6d1eaab commit 9c230ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()

Expand Down
4 changes: 4 additions & 0 deletions cmake/dtrace-utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()

0 comments on commit 9c230ef

Please sign in to comment.