-
Notifications
You must be signed in to change notification settings - Fork 8
/
CMakeLists.txt
55 lines (42 loc) · 1.14 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
52
53
54
55
cmake_minimum_required(VERSION 3.16)
project(ada-idna
DESCRIPTION "IDNA"
LANGUAGES C CXX
VERSION 0.1.0
)
include(GNUInstallDirs)
include(CTest)
include(cmake/idna-flags.cmake)
add_subdirectory(src)
include(cmake/clang-format.cmake)
option(ADA_IDNA_BENCHMARKS "Build benchmarks" OFF)
if(ADA_IDNA_BENCHMARKS OR BUILD_TESTING)
include(${PROJECT_SOURCE_DIR}/cmake/import.cmake)
import_dependency(simdjson simdjson/simdjson 0a3a00c95665cc1fda760e121ba8d442945ede13)
add_dependency(simdjson)
endif()
if (ADA_IDNA_BENCHMARKS)
message(STATUS "Ada benchmarks enabled.")
add_subdirectory(benchmarks)
else(ADA_IDNA_BENCHMARKS)
if (is_top_project)
message(STATUS "Ada IDNA benchmarks disabled. Set ADA_IDNA_BENCHMARKS=ON to enable them.")
endif()
endif()
if (BUILD_TESTING)
message(STATUS "The tests are enabled.")
add_subdirectory(tests)
else()
if(is_top_project)
message(STATUS "The tests are disabled.")
endif()
endif(BUILD_TESTING)
add_subdirectory(singleheader)
install(
FILES include/idna.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)
install(
DIRECTORY include/ada
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)