Fixed building on LLVM 12

This commit is contained in:
Bartek Kryza
2021-05-01 11:27:36 +02:00
parent c6acc7bf20
commit 68be22f9dd
3 changed files with 4 additions and 8 deletions

View File

@@ -18,9 +18,6 @@
# This Makefile is just a handy wrapper around cmake
#
# Specify preferred LLVM version for CMake
LLVM_VERSION ?= 11
.DEFAULT_GOAL := debug
.PHONY: clean
@@ -30,14 +27,12 @@ clean:
debug/CMakeLists.txt:
cmake -S . -B debug \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=Debug \
-DLIBCLANG_LLVM_CONFIG_EXECUTABLE=/usr/bin/llvm-config-${LLVM_VERSION}
-DCMAKE_BUILD_TYPE=Debug
release/CMakeLists.txt:
cmake -S . -B release \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=Release \
-DLIBCLANG_LLVM_CONFIG_EXECUTABLE=/usr/bin/llvm-config-${LLVM_VERSION}
-DCMAKE_BUILD_TYPE=Release
debug: debug/CMakeLists.txt
make -C debug -j

View File

@@ -57,7 +57,7 @@ if (NOT LIBCLANG_LLVM_CONFIG_EXECUTABLE)
find_program(LIBCLANG_LLVM_CONFIG_EXECUTABLE NAMES llvm-config PATHS "${BREW_LLVM_PATH}/bin")
else ()
set(llvm_config_names llvm-config)
foreach(major RANGE 11 3)
foreach(major RANGE 12 3)
list(APPEND llvm_config_names "llvm-config${major}" "llvm-config-${major}")
foreach(minor RANGE 9 0)
list(APPEND llvm_config_names "llvm-config${major}${minor}" "llvm-config-${major}.${minor}" "llvm-config-mp-${major}.${minor}")

View File

@@ -1,4 +1,5 @@
#include <functional>
#include <string>
namespace clanguml {
namespace t00003 {