Fixed building on macos with LLVM Clang

This commit is contained in:
Bartek Kryza
2023-02-07 23:18:19 +01:00
parent 43328e3e2d
commit 78ec599466
2 changed files with 6 additions and 17 deletions

View File

@@ -22,11 +22,11 @@ else(MSVC)
add_library(clang-umllib OBJECT ${SOURCES})
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>
$<$<CXX_COMPILER_ID:MSVC>:
/MP /W1 /std:c++17 /bigobj /wd4291 /wd4624 /wd4244>)
$<$<CXX_COMPILER_ID:MSVC>:/MP /W1 /bigobj /wd4291 /wd4624 /wd4244>)
target_compile_definitions(clang-umllib PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:
-DLLVM_FORCE_USE_OLD_TOOLCHAIN>)
@@ -36,12 +36,11 @@ target_compile_definitions(clang-umllib PRIVATE
#
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>
$<$<CXX_COMPILER_ID:MSVC>:
/MP /W1 /std:c++17 /bigobj /wd4291 /wd4624 /wd4244>)
$<$<CXX_COMPILER_ID:MSVC>:/MP /W1 /bigobj /wd4291 /wd4624 /wd4244>)
target_link_libraries(clang-uml
${YAML_CPP_LIBRARIES}
${LIBTOOLING_LIBS}