Skip to content

Commit

Permalink
tracy: Manage generated header extension
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisv committed Sep 11, 2024
1 parent bf1637e commit 85fb98f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tracy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ function(_SETUP_TRACY_HEADER)
endif()
string(TOLOWER "${HEADER_DIR}" "HEADER_DIR")

if(NOT DEFINED PROJECT_CUSTOM_HEADER_EXTENSION)
set(HEADER_EXTENSION "hh")
else()
set(HEADER_EXTENSION ${PROJECT_CUSTOM_HEADER_EXTENSION})
endif()

string(REGEX REPLACE "[^a-zA-Z0-9]" "_" PACKAGE_CPPNAME "${PROJECT_NAME}")
string(TOUPPER "${PACKAGE_CPPNAME}" PACKAGE_CPPNAME)

Expand All @@ -61,7 +67,7 @@ function(_SETUP_TRACY_HEADER)
HEADER_DIR
${HEADER_DIR}
FILENAME
tracy.hpp
tracy.${HEADER_EXTENSION}
LIBRARY_NAME
${PACKAGE_CPPNAME}
TRACY_ENABLE
Expand Down

0 comments on commit 85fb98f

Please sign in to comment.