← 返回首页
Fix boost errors during configuration in CMake 3.5.1 by umar456 · Pull Request #2771 · arrayfire/arrayfire · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .cmake  (1) .txt  (3) All 2 file types selected Viewed files
Conversations
Failed to load comments. Retry
Loading
Jump to
Jump to file
Failed to load files. Retry
Loading
Diff view
Unified
Split
Hide whitespace
Apply and reload
Show whitespace
Diff view
Unified
Split
Hide whitespace
Apply and reload
7 changes: 7 additions & 0 deletions CMakeModules/boost_package.cmake
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ if(NOT
INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIR};${source_dir}/include"
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIR};${source_dir}/include"
)
else()
if(NOT TARGET Boost::boost)
add_library(Boost::boost IMPORTED INTERFACE GLOBAL)
set_target_properties(Boost::boost PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIR}"
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIR}")
endif()
endif()

if(TARGET Boost::boost)
Expand Down
10 changes: 10 additions & 0 deletions src/backend/cuda/CMakeLists.txt
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,16 @@ endfunction()
arrayfire_get_cuda_cxx_flags(cuda_cxx_flags)
arrayfire_get_platform_definitions(platform_flags)


get_property(boost_includes TARGET Boost::boost PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
get_property(boost_definitions TARGET Boost::boost PROPERTY INTERFACE_COMPILE_DEFINITIONS)

string(REPLACE ";" ";-I" boost_includes "-I${boost_includes}")
string(REPLACE ";" ";-D" boost_definitions "-D${boost_definitions}")

set(cuda_cxx_flags "${cuda_cxx_flags};${boost_includes}")
set(cuda_cxx_flags "${cuda_cxx_flags};${boost_definitions}")

# This definition is required in addition to the definition below because in
# an older verion of cmake definitions added using target_compile_definitions
# were not added to the nvcc flags. This manually adds these definitions and
Expand Down
2 changes: 0 additions & 2 deletions src/backend/cuda/kernel/scan_by_key/CMakeLists.txt
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ foreach(SBK_BINARY_OP ${SBK_BINARY_OPS})
"${CMAKE_CURRENT_SOURCE_DIR}/kernel/scan_dim_by_key_impl.hpp"
"${CMAKE_CURRENT_SOURCE_DIR}/kernel/scan_first_by_key_impl.hpp"
OPTIONS
-I$<JOIN:$<TARGET_PROPERTY:Boost::boost,INTERFACE_INCLUDE_DIRECTORIES>, -I>
-D$<JOIN:$<TARGET_PROPERTY:Boost::boost,INTERFACE_COMPILE_DEFINITIONS>, -D>
-DSBK_BINARY_OP=${SBK_BINARY_OP} "${platform_flags} ${cuda_cxx_flags} -DAFDLL"
)

Expand Down
10 changes: 4 additions & 6 deletions src/backend/cuda/kernel/thrust_sort_by_key/CMakeLists.txt
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/kernel/thrust_sort_by_key/thrust_sort_

foreach(STR ${FILESTRINGS})
if(${STR} MATCHES "// SBK_TYPES")
STRING(REPLACE "// SBK_TYPES:" "" TEMP ${STR})
STRING(REPLACE " " ";" SBK_TYPES ${TEMP})
string(REPLACE "// SBK_TYPES:" "" TEMP ${STR})
string(REPLACE " " ";" SBK_TYPES ${TEMP})
elseif(${STR} MATCHES "// SBK_INSTS:")
STRING(REPLACE "// SBK_INSTS:" "" TEMP ${STR})
STRING(REPLACE " " ";" SBK_INSTS ${TEMP})
string(REPLACE "// SBK_INSTS:" "" TEMP ${STR})
string(REPLACE " " ";" SBK_INSTS ${TEMP})
endif()
endforeach()

Expand All @@ -34,8 +34,6 @@ foreach(SBK_TYPE ${SBK_TYPES})
${CMAKE_CURRENT_BINARY_DIR}/kernel/thrust_sort_by_key/thrust_sort_by_key_impl_${SBK_TYPE}_${SBK_INST}.cu
${CMAKE_CURRENT_SOURCE_DIR}/kernel/thrust_sort_by_key_impl.hpp
OPTIONS
-I$<JOIN:$<TARGET_PROPERTY:Boost::boost,INTERFACE_INCLUDE_DIRECTORIES>, -I>
-D$<JOIN:$<TARGET_PROPERTY:Boost::boost,INTERFACE_COMPILE_DEFINITIONS>, -D>
-DSBK_TYPE=${SBK_TYPE}
-DINSTANTIATESBK_INST=INSTANTIATE${SBK_INST}
"${platform_flags} ${cuda_cxx_flags} -DAFDLL"
Expand Down
Toggle all file notes Toggle all file annotations

Footer

© 2026 GitHub, Inc.