-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
30 lines (24 loc) · 763 Bytes
/
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
cmake_minimum_required(VERSION 3.5)
set(project_name trigonometrix)
project(${project_name} LANGUAGES CXX)
add_library(project_options INTERFACE)
target_compile_features(project_options INTERFACE cxx_std_20)
# for clang and gcc add -mfma and for msvc /fp:fast
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options("-mfma")
endif()
add_executable(${project_name}
src/main.cpp
src/trigonometry.hpp
src/lut_generator.hpp
src/polynomials_coeffs.hpp
)
target_link_libraries(${project_name} PRIVATE project_options)
option(ENABLE_TESTING "Enable Test Builds" ON)
if(ENABLE_TESTING)
message(
"Building Tests."
)
add_subdirectory(tests)
add_test(Benchmark tests/tests 1)
endif()