mirror of https://github.com/libAthena/athena.git
Updates for Clang 10 on Windows
This commit is contained in:
parent
347d807a23
commit
5489a25fbe
|
@ -25,24 +25,24 @@ endif()
|
||||||
if(ATDNA_DYNAMIC_LLVM)
|
if(ATDNA_DYNAMIC_LLVM)
|
||||||
find_library(CLANGCPP_LIB clang-cpp HINTS "${LLVM_ROOT_DIR}/lib")
|
find_library(CLANGCPP_LIB clang-cpp HINTS "${LLVM_ROOT_DIR}/lib")
|
||||||
if (NOT CLANGCPP_LIB)
|
if (NOT CLANGCPP_LIB)
|
||||||
list(APPEND LLVM_LIBS
|
list(APPEND LLVM_LIBS
|
||||||
clangFrontend
|
clangFrontend
|
||||||
clangTooling
|
clangTooling
|
||||||
clangDriver
|
clangDriver
|
||||||
clangSerialization
|
clangSerialization
|
||||||
clangParse
|
clangParse
|
||||||
clangSema
|
clangSema
|
||||||
clangAnalysis
|
clangAnalysis
|
||||||
clangEdit
|
clangEdit
|
||||||
clangAST
|
clangAST
|
||||||
clangLex
|
clangLex
|
||||||
clangBasic
|
clangBasic
|
||||||
LLVM)
|
LLVM)
|
||||||
else()
|
else()
|
||||||
list(APPEND LLVM_LIBS
|
list(APPEND LLVM_LIBS
|
||||||
clang-cpp
|
clang-cpp
|
||||||
LLVM)
|
LLVM)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
find_library(LLVMDEMANGLE_LIB LLVMDemangle HINTS "${LLVM_ROOT_DIR}/lib")
|
find_library(LLVMDEMANGLE_LIB LLVMDemangle HINTS "${LLVM_ROOT_DIR}/lib")
|
||||||
find_library(LLVMBINARYFORMAT_LIB LLVMBinaryFormat HINTS "${LLVM_ROOT_DIR}/lib")
|
find_library(LLVMBINARYFORMAT_LIB LLVMBinaryFormat HINTS "${LLVM_ROOT_DIR}/lib")
|
||||||
|
@ -83,7 +83,8 @@ else()
|
||||||
LLVMSupport
|
LLVMSupport
|
||||||
LLVMRemarks
|
LLVMRemarks
|
||||||
LLVMBitStreamReader
|
LLVMBitStreamReader
|
||||||
${LLVMDEMANGLE_LIB})
|
${LLVMDEMANGLE_LIB}
|
||||||
|
LLVMFrontendOpenMP)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
string(FIND ${LLVM_VERSION_STRING} "svn" SVN_FILTER_IDX)
|
string(FIND ${LLVM_VERSION_STRING} "svn" SVN_FILTER_IDX)
|
||||||
|
@ -139,13 +140,14 @@ set_source_files_properties(main.cpp PROPERTIES COMPILE_DEFINITIONS
|
||||||
"INSTALL_PREFIX=${ABS_INSTALL_BIN_DIR};__STDC_LIMIT_MACROS=1;__STDC_CONSTANT_MACROS=1")
|
"INSTALL_PREFIX=${ABS_INSTALL_BIN_DIR};__STDC_LIMIT_MACROS=1;__STDC_CONSTANT_MACROS=1")
|
||||||
target_include_directories(atdna PRIVATE ${LLVM_INCLUDE_DIRS})
|
target_include_directories(atdna PRIVATE ${LLVM_INCLUDE_DIRS})
|
||||||
target_link_directories(atdna PRIVATE ${LLVM_LIBRARY_DIRS})
|
target_link_directories(atdna PRIVATE ${LLVM_LIBRARY_DIRS})
|
||||||
|
# Clang 10.0.x headers currently broken with C++20
|
||||||
|
set_property(TARGET atdna PROPERTY CXX_STANDARD 17)
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
# Allow linking against release-built LLVM libraries
|
# Allow linking against release-built LLVM libraries
|
||||||
target_compile_options(atdna PRIVATE /GR- /D_ITERATOR_DEBUG_LEVEL=0)
|
target_compile_options(atdna PRIVATE /GR- /D_ITERATOR_DEBUG_LEVEL=0)
|
||||||
set_property(TARGET atdna PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreadedDLL")
|
set_property(TARGET atdna PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreadedDLL")
|
||||||
else()
|
else()
|
||||||
target_compile_options(atdna PRIVATE -fno-rtti -Wno-error)
|
target_compile_options(atdna PRIVATE -fno-rtti -Wno-error)
|
||||||
set_property(TARGET atdna PROPERTY CXX_STANDARD 17)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Define installs
|
# Define installs
|
||||||
|
|
Loading…
Reference in New Issue