Enabled building against LLVM 17

This commit is contained in:
Bartek Kryza 2023-10-13 11:49:59 +02:00
parent 26abb71b4c
commit f339c34dd8
No known key found for this signature in database
GPG Key ID: 6CDA4566635E93B1
4 changed files with 20 additions and 7 deletions

View File

@ -132,6 +132,18 @@ if(APPLE OR (LLVM_VERSION_MAJOR GREATER_EQUAL 16))
${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES})
endif()
#
# Setup custom compile options depending on various compiler
# and environment quirks
#
if(LLVM_VERSION_MAJOR GREATER_EQUAL 17)
set(CUSTOM_COMPILE_OPTIONS "-Wno-class-memaccess")
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CUSTOM_COMPILE_OPTIONS
"${CUSTOM_COMPILE_OPTIONS} -Wno-unused-private-field")
endif()
#
# Setup threads library
#

View File

@ -5,7 +5,7 @@
[![Build status](https://github.com/bkryza/clang-uml/actions/workflows/build.yml/badge.svg)](https://github.com/bkryza/clang-uml/actions)
[![Coverage](https://codecov.io/gh/bkryza/clang-uml/branch/master/graph/badge.svg)](https://codecov.io/gh/bkryza/clang-uml)
[![Version](https://img.shields.io/badge/version-0.4.0-blue)](https://github.com/bkryza/clang-uml/releases)
[![Version](https://img.shields.io/badge/LLVM-12,13,14,15,16-orange)](https://github.com/bkryza/clang-uml/releases)
[![Version](https://img.shields.io/badge/LLVM-12,13,14,15,16,17-orange)](https://github.com/bkryza/clang-uml/releases)
[![Doxygen](https://img.shields.io/badge/Docs-Doxygen-gainsboro)](https://clang-uml.github.io)
`clang-uml` is an automatic C++ to UML class, sequence, package and include diagram generator, driven by

View File

@ -25,8 +25,8 @@ endif(MSVC)
target_compile_features(clang-umllib INTERFACE cxx_std_17)
target_compile_options(clang-umllib PRIVATE
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>>:
-Werror -Wall -Wextra -Wno-unused-parameter -Wno-unused-private-field
-Wno-deprecated-declarations>
-Werror -Wall -Wextra -Wno-unused-parameter
-Wno-deprecated-declarations ${CUSTOM_COMPILE_OPTIONS}>
$<$<CXX_COMPILER_ID:MSVC>:/MP /W1 /bigobj /wd4291 /wd4624 /wd4244>)
target_compile_definitions(clang-umllib PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:
@ -40,8 +40,8 @@ add_executable(clang-uml ${MAIN_SOURCE_FILE})
target_compile_features(clang-uml PUBLIC cxx_std_17)
target_compile_options(clang-uml PRIVATE
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>>:
-Werror -Wall -Wextra -Wno-unused-parameter -Wno-unused-private-field
-Wno-deprecated-declarations>
-Werror -Wall -Wextra -Wno-unused-parameter
-Wno-deprecated-declarations ${CUSTOM_COMPILE_OPTIONS}>
$<$<CXX_COMPILER_ID:MSVC>:/MP /W1 /bigobj /wd4291 /wd4624 /wd4244>)
target_compile_definitions(clang-uml PRIVATE
${ENABLE_BACKWARD_CPP})

View File

@ -58,8 +58,9 @@ foreach(TEST_NAME ${TEST_CASES})
target_compile_options(${TEST_NAME} PRIVATE
$<$<COMPILE_LANGUAGE:CXX>:
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>>:
-Wno-unused-parameter -Wno-unused-private-field -Wno-unused-variable
-Wno-attributes -Wno-nonnull -Wno-deprecated-enum-enum-conversion>
-Wno-unused-parameter -Wno-unused-variable
-Wno-attributes -Wno-nonnull -Wno-deprecated-enum-enum-conversion
${CUSTOM_COMPILE_OPTIONS}>
$<$<CXX_COMPILER_ID:MSVC>:/W1 /bigobj /wd4624>>)
target_link_libraries(${TEST_NAME} PRIVATE ${CLANG_UML_TEST_LIBRARIES})
endforeach()