-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
35 lines (27 loc) · 902 Bytes
/
CMakeLists.txt
File metadata and controls
35 lines (27 loc) · 902 Bytes
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
cmake_minimum_required(VERSION 3.25.1)
project(
fexpr
VERSION 0.0
DESCRIPTION "expr with multiprecision float support"
LANGUAGES CXX
)
# configure a header file to pass some of the CMake settings
# to the source code
configure_file(
"${PROJECT_SOURCE_DIR}/include/config.h.in"
"${PROJECT_BINARY_DIR}/include/config.h"
)
# compiler flags
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Use GNU Install Dirs
include(GNUInstallDirs)
add_executable(${PROJECT_NAME} src/main.cpp src/ast.cpp src/parse.cpp src/eval_visitor.cpp)
# include directories (must be after add_executable)
target_include_directories(${PROJECT_NAME} PUBLIC
"${PROJECT_BINARY_DIR}/include"
"${PROJECT_SOURCE_DIR}/include"
)
install(TARGETS ${PROJECT_NAME} DESTINATION bin)