-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
29 lines (24 loc) · 1013 Bytes
/
Copy pathCMakeLists.txt
File metadata and controls
29 lines (24 loc) · 1013 Bytes
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
# Google Benchmark & Test
#set(BENCHMARK_ENABLE_LTO ON)
set(BENCHMARK_ENABLE_TESTING OFF)
include(FetchContent)
FetchContent_Declare(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG release-1.12.1)
FetchContent_Declare(
benchmark
GIT_REPOSITORY https://github.com/google/benchmark.git
GIT_TAG v1.7.0)
FetchContent_MakeAvailable(googletest benchmark)
set(BLA_VENDER OpenBLAS)
find_package(BLAS REQUIRED)
add_executable(matrix_benchmark benchmark.cpp)
target_link_libraries(matrix_benchmark benchmark::benchmark matrix ${BLAS_LIBRARIES})
target_compile_options(matrix_benchmark PRIVATE ${CXX_MY_FLAGS} -march=native -flto -Ofast -lpthread)
include_directories(PRIVATE ${MatrixMultiplication_SOURCE_DIR}/src)
#add_executable(unittest token_test.cpp parse_test.cpp test.hpp number_test.cpp)
#target_link_libraries(unittest GTest::gtest_main libcalc)
#target_compile_options(unittest PRIVATE ${CXX_MY_FLAGS})
#include(GoogleTest)
#gtest_discover_tests(unittest)