Skip to content

Commit

Permalink
workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike-Leo-Smith committed Jun 3, 2024
1 parent 7e64fe7 commit 4142755
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ target_link_libraries(luisa-render-util PUBLIC
luisa-render-include
luisa-render-ext)

# work around the clang bug: https://github.com/Homebrew/homebrew-core/issues/169820
if (APPLE AND CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 18)
# work around the clang issue: https://github.com/Homebrew/homebrew-core/issues/169820
if (APPLE AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
cmake_path(GET CMAKE_CXX_COMPILER PARENT_PATH CLANG_BIN_PATH)
cmake_path(GET CLANG_BIN_PATH PARENT_PATH CLANG_ROOT_PATH)
target_link_libraries(luisa-compute-core PUBLIC "-L${CLANG_ROOT_PATH}/lib/c++")
set(LIBCXX_PATH "${CLANG_ROOT_PATH}/lib/c++")
if (EXISTS ${LIBCXX_PATH})
target_link_libraries(luisa-compute-core PUBLIC "-L${LIBCXX_PATH}")
endif ()
endif ()

set_target_properties(luisa-render-util PROPERTIES
Expand Down

0 comments on commit 4142755

Please sign in to comment.