-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
33 lines (25 loc) · 828 Bytes
/
CMakeLists.txt
File metadata and controls
33 lines (25 loc) · 828 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
# Cmake version
cmake_minimum_required(VERSION 3.8)
# Project name and languages
project(
kmath
LANGUAGES C CXX)
# Set C++ standard
set(CMAKE_CXX_STANDARD 20)
# Compiler flags
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Ox")
message (STATUS "COMPILER FLAGS: " ${CMAKE_CXX_FLAGS})
# Locate header files
file(GLOB LIBRARY_FILES "include/kma/*.hpp")
# Create an INTERFACE library (header-only library)
add_library(kmath_library INTERFACE)
# Set C++ features for the library
target_compile_features(kmath_library INTERFACE cxx_std_20)
# Set include directories for the library
target_include_directories(kmath_library INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
# Add subdirectories
add_subdirectory(demos)
add_subdirectory(tests)