This repository has been archived by the owner on Jul 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
51 lines (39 loc) · 1.45 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
# This file is a part of HAXX
#
# Copyright (c) 2017 David Williams-Young
# All rights reserved.
#
# See LICENSE.txt
#
cmake_minimum_required(VERSION 3.0)
project(HAXX CXX C Fortran)
set(HAXX_VERSION_MAJOR ALPHA)
set(HAXX_VERSION_MINOR 1)
set(HAXX_VERSION_PATCH 0)
include_directories("${PROJECT_SOURCE_DIR}/include")
include_directories("${PROJECT_BINARY_DIR}/include")
configure_file(
"${PROJECT_SOURCE_DIR}/include/haxx_config.hpp.in"
"${PROJECT_BINARY_DIR}/include/haxx_config.hpp"
)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
message(STATUS "${CMAKE_CXX_COMPILER_ID} Recognized as CLANG: Adding -D_HAXX_UT_BUTF_NINCLUDED")
add_definitions("-D_HAXX_UT_BUTF_NINCLUDED")
endif()
# Options
option( HAXX_ENABLE_BENCHMARK "Enable Build of HAXX / HBLAS Benchmark" OFF )
option( HAXX_ENABLE_TESTING "Enable Build of HAXX / HBLAS Unit Tests" ON )
option( HAXX_USE_HOST_SIMD "Use Host Native Flags for SIMD" ON )
include(HAXXCompilerFlags)
include(HAXXHandleSIMD)
add_subdirectory(src)
if( HAXX_ENABLE_TESTING )
enable_testing()
add_subdirectory(tests)
endif()
# Install Headers
install(FILES ${PROJECT_SOURCE_DIR}/include/haxx.hpp DESTINATION include)
install(FILES ${PROJECT_SOURCE_DIR}/include/hblas.hpp DESTINATION include)
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/haxx DESTINATION include)
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/hblas DESTINATION include)