CMakeLists.txt 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Copyright (C) Microsoft Corporation. All rights reserved.
  2. # This file is distributed under the University of Illinois Open Source License. See LICENSE.TXT for details.
  3. # Generate ETW instrumentation.
  4. # Create the header in a temporary file and only update when necessary,
  5. # to avoid invalidating targets that depend on it.
  6. add_custom_command(
  7. OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/tmpdxcruntimeetw.h
  8. COMMAND mc -r ${CMAKE_CURRENT_BINARY_DIR} -h ${CMAKE_CURRENT_BINARY_DIR} -p DxcRuntimeEtw_ -um -z tmpdxcruntimeetw ${CMAKE_CURRENT_SOURCE_DIR}/DxcRuntime.man
  9. DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/DxcRuntime.man
  10. COMMENT "Building instrumentation manifest ..."
  11. )
  12. add_custom_command(
  13. OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/DxcRuntimeEtw.h
  14. COMMAND ${CMAKE_COMMAND} -E copy_if_different
  15. ${CMAKE_CURRENT_BINARY_DIR}/tmpdxcruntimeetw.h
  16. ${CMAKE_CURRENT_BINARY_DIR}/DxcRuntimeEtw.h
  17. COMMAND ${CMAKE_COMMAND} -E copy_if_different
  18. ${CMAKE_CURRENT_BINARY_DIR}/tmpdxcruntimeetw.rc
  19. ${CMAKE_CURRENT_BINARY_DIR}/DxcRuntimeEtw.rc
  20. COMMAND ${CMAKE_COMMAND} -E copy_if_different
  21. ${CMAKE_CURRENT_BINARY_DIR}/tmpdxcruntimeetwTEMP.bin
  22. ${CMAKE_CURRENT_BINARY_DIR}/DxcRuntimeEtwtemp.BIN
  23. COMMAND ${CMAKE_COMMAND} -E copy_if_different
  24. ${CMAKE_CURRENT_BINARY_DIR}/tmpdxcruntimeetw_msg00001.bin
  25. ${CMAKE_CURRENT_BINARY_DIR}/DxcRuntimeEtw_msg00001.bin
  26. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/tmpdxcruntimeetw.h
  27. COMMENT "Updating instrumentation manifest ..."
  28. )
  29. set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/DxcRuntimeEtw.h PROPERTIES GENERATED 1)
  30. set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/DxcRuntimeEtw.rc PROPERTIES GENERATED 1)
  31. set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/DxcRuntimeEtwtemp.bin PROPERTIES GENERATED 1)
  32. set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/DxcRuntimeEtw_msg00001.bin PROPERTIES GENERATED 1)
  33. add_custom_target(DxcRuntimeEtw
  34. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/DxcRuntimeEtw.h
  35. SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/DxcRuntime.man
  36. )
  37. # Not quite library, but close enough.
  38. set_target_properties(DxcRuntimeEtw PROPERTIES FOLDER "Dxilconv libraries")