-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
44 lines (38 loc) · 1.16 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
cmake_minimum_required (VERSION 3.15) #FetchContent
project(UnitVectorEncoding)
include(FetchContent)
FetchContent_Declare(
cmakefetchcontent_googletest
GIT_REPOSITORY https://github.com/CMakeFetchContent/googletest.git
)
FetchContent_MakeAvailable(cmakefetchcontent_googletest)
FetchContent_Declare(
googlebenchmark
GIT_REPOSITORY https://github.com/google/benchmark.git
CMAKE_ARGS
-DCMAKE_BUILD_TYPE:STRING=Release
-DBENCHMARK_ENABLE_TESTING=OFF
-DBENCHMARK_ENABLE_GTEST_TESTS=OFF
# BUILD_COMMAND ${CMAKE_COMMAND} --build . --config Release
# TODO Living at trunk!
)
set(BENCHMARK_ENABLE_TESTING OFF CACHE INTERNAL "")
set(BENCHMARK_ENABLE_GTEST_TESTS OFF CACHE INTERNAL "")
#set(CMAKE_BUILD_TYPE Release CACHE INTERNAL "<some description>")
FetchContent_MakeAvailable(googlebenchmark)
# Add source to this project'sexecutable.
add_executable (UnitVectorEncoding
"test.cpp" )
target_compile_options(UnitVectorEncoding
PUBLIC
-ffast-math -mfma
)
target_compile_features( UnitVectorEncoding
PUBLIC
cxx_std_17
)
target_link_libraries(UnitVectorEncoding
PUBLIC
GTest::Main
benchmark::benchmark
)