-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
37 lines (29 loc) · 1.15 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
cmake_minimum_required(VERSION 3.10)
project(mrbind)
add_executable(mrbind
src/combine_types.cpp
src/data_to_json.cpp
src/data_to_macros.cpp
src/main.cpp
src/multiplex_data.cpp
src/string_manip.cpp
)
set_property(TARGET mrbind PROPERTY CXX_STANDARD 20)
set_property(TARGET mrbind PROPERTY CXX_EXTENSIONS off)
if(NOT MSVC)
target_compile_options(mrbind PRIVATE -Wall -Wextra -pedantic-errors -Wdeprecated -Wextra-semi -Wimplicit-fallthrough -Wconversion)
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_compile_options(mrbind PRIVATE -fstandalone-debug)
endif()
target_include_directories(mrbind PUBLIC include)
find_package(Clang REQUIRED)
target_include_directories(mrbind PRIVATE ${LLVM_INCLUDE_DIR} ${CLANG_INCLUDE_DIR})
if (TARGET clangTooling)
target_link_libraries(mrbind PRIVATE clangTooling)
else()
# The only platform where this branch is used (that I know of) is Arch.
# Trying this on e.g. Ubuntu causes the following runtime error when you run the resulting application:
# LLVM ERROR: inconsistency in registered CommandLine options
target_link_libraries(mrbind PRIVATE clang-cpp LLVMSupport)
endif()