Skip to content

Use PROJECT_SOURCE_DIR instead of CMAKE_SOURCE_DIR #2550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading