Skip to content

Commit

Permalink
trying to workaround clang bug on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike-Leo-Smith committed Jun 3, 2024
1 parent dd6ebde commit 7e64fe7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ target_link_libraries(luisa-render-util PUBLIC
luisa::compute
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)
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++")
endif ()

set_target_properties(luisa-render-util PROPERTIES
WINDOWS_EXPORT_ALL_SYMBOLS ON
UNITY_BUILD ${LUISA_RENDER_ENABLE_UNITY_BUILD})
Expand Down

0 comments on commit 7e64fe7

Please sign in to comment.