Skip to content

Commit

Permalink
[build] Clang 15 requires a flag to enable <ranges>
Browse files Browse the repository at this point in the history
  • Loading branch information
rbrich committed Nov 18, 2024
1 parent ef17d9d commit 8feffa0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ set(XCI_CXX_STANDARD 20)
if (HAVE_LIBSTDCXX)
set(CMAKE_CXX_EXTENSIONS ON) # for __int128
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS_EQUAL 15)
# Enable C++20 ranges in Clang 15
add_compile_options(-fexperimental-library)
endif()

set(XCIKIT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})

Expand Down

0 comments on commit 8feffa0

Please sign in to comment.