Skip to content
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

Fix/tbb cmake macro #194

Merged
merged 2 commits into from
Apr 18, 2023
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
3 changes: 1 addition & 2 deletions owl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,10 @@ endif()

target_include_directories(owl
PUBLIC
/usr/local/cuda/include/
${PROJECT_SOURCE_DIR}
${CMAKE_CURRENT_LIST_DIR}/include
)
set_property(TARGET owl PROPERTY CUDA_ARCHITECTURES OFF)
set_property(TARGET owl PROPERTY CUDA_ARCHITECTURES OFF)

if (WIN32)
target_compile_definitions(owl PUBLIC -DNOMINMAX)
Expand Down
12 changes: 10 additions & 2 deletions owl/cmake/configure_tbb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,15 @@ if(POLICY CMP0074)
endif()

if (OWL_USE_TBB AND (NOT OWL_DISABLE_TBB))
find_package(TBB)

#
# first try find_package in CONFIG mode, it will be catched by OneTBB
# if OneTBB is not avaible, then use the old macro
#
find_package(TBB CONFIG)
if (NOT TBB_FOUND)
find_package(TBB)
endif()

if (TBB_FOUND)
# include_directories(${TBB_INCLUDE_DIR})
Expand All @@ -39,4 +47,4 @@ if (OWL_USE_TBB AND (NOT OWL_DISABLE_TBB))
endif()
else()
set(OWL_HAVE_TBB OFF)
endif()
endif()