Skip to content

Commit

Permalink
Merge pull request #2550 from kbenzie/benie/dont-use-cmake-source-dir
Browse files Browse the repository at this point in the history
Use PROJECT_SOURCE_DIR instead of CMAKE_SOURCE_DIR
  • Loading branch information
kbenzie authored Jan 14, 2025
2 parents e5f9403 + f2661cf commit ef70004
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmake/helpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ set(CFI_FLAGS "")
if (CFI_HAS_CFI_SANITIZE)
# cfi-icall requires called functions in shared libraries to also be built with cfi-icall, which we can't
# guarantee. -fsanitize=cfi depends on -flto
set(CFI_FLAGS "-flto -fsanitize=cfi -fno-sanitize=cfi-icall -fsanitize-ignorelist=${CMAKE_SOURCE_DIR}/sanitizer-ignorelist.txt")
set(CFI_FLAGS "-flto -fsanitize=cfi -fno-sanitize=cfi-icall -fsanitize-ignorelist=${PROJECT_SOURCE_DIR}/sanitizer-ignorelist.txt")
endif()

function(add_ur_target_compile_options name)
Expand Down
2 changes: 1 addition & 1 deletion examples/collector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ add_ur_library(${TARGET_NAME} SHARED
)

target_include_directories(${TARGET_NAME} PRIVATE
${CMAKE_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/include
)

target_link_libraries(${TARGET_NAME} PRIVATE ${TARGET_XPTI})
Expand Down
2 changes: 1 addition & 1 deletion source/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ add_library(${PROJECT_NAME}::common ALIAS ur_common)

target_include_directories(ur_common PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
)

message(STATUS "Download Unified Memory Framework from github.com")
Expand Down
2 changes: 1 addition & 1 deletion test/layers/tracing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ add_ur_library(test_collector SHARED
)

target_include_directories(test_collector PRIVATE
${CMAKE_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/include
)

target_link_libraries(test_collector PRIVATE ${TARGET_XPTI})
Expand Down
2 changes: 1 addition & 1 deletion tools/urtrace/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ add_ur_library(${TARGET_NAME} SHARED
)

target_include_directories(${TARGET_NAME} PRIVATE
${CMAKE_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/include
)

target_link_libraries(${TARGET_NAME} PRIVATE ${TARGET_XPTI} ${PROJECT_NAME}::common ${CMAKE_DL_LIBS})
Expand Down

0 comments on commit ef70004

Please sign in to comment.