Skip to content

Commit

Permalink
chpldoc:adjust cxx standard based on LLVM version
Browse files Browse the repository at this point in the history
Signed-off-by: arezaii <[email protected]>
  • Loading branch information
arezaii committed Dec 4, 2023
1 parent 68b3b7a commit 83ff676
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tools/chpldoc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ add_custom_command(
COMMENT "writing COPYRIGHT file updates..."
VERBATIM)
add_executable(chpldoc chpldoc.cpp arg.cpp arg-helpers.cpp COPYRIGHT)
set_property(TARGET chpldoc PROPERTY CXX_STANDARD 17)
# request C++14 -- or C++17 if using LLVM 16
if (CHPL_LLVM_VERSION VERSION_LESS 16.0)
set(CMAKE_CXX_STANDARD 14)
else()
set(CMAKE_CXX_STANDARD 17)
endif()
set(CMAKE_CXX_STANDARD_REQUIRED True)
target_link_libraries(chpldoc ChplFrontend)
target_include_directories(chpldoc PRIVATE
${CHPL_MAIN_INCLUDE_DIR}
Expand Down

0 comments on commit 83ff676

Please sign in to comment.