-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
51 lines (39 loc) · 1.31 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
cmake_minimum_required(VERSION 3.10)
cmake_policy(SET CMP0076 NEW)
# set the project name
project(feslite VERSION 1.0
LANGUAGES C ASM
HOMEPAGE_URL https://github.com/cbouilla/libfes-lite)
include(FindPython3)
include(CTest)
find_package (Python3 COMPONENTS Interpreter) # Development
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'Debug' as none was specified.")
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build." FORCE)
endif()
add_compile_options(-Wall -Werror -O3 -Wno-unused-function)
# specify the C standard
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED True)
# OpenMP ?
find_package(OpenMP)
#####################################################################
# Obtain information from the host (copied from CADO-NFS).
if (DEFINED ENV{NO_SSE})
message(STATUS "As per $NO_SSE, disabling all simd intrinsics")
else()
include("config/sse2.cmake")
include("config/avx2.cmake")
include("config/avx512.cmake")
endif()
if (DEFINED ENV{NO_NEON})
message(STATUS "As per $NO_NEON, disabling all ARM NEON intrinsics")
else()
include("config/neon.cmake")
endif()
configure_file(src/feslite-config.h.in src/feslite-config.h)
add_subdirectory(src)
add_subdirectory(benchmark)
if(BUILD_TESTING)
add_subdirectory(test)
endif()