You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.0 KiB
38 lines
1.0 KiB
|
|
cmake_minimum_required(VERSION 3.10) |
|
|
|
# set the project name |
|
project(test) |
|
|
|
add_compile_options(-g -O2 -fno-pie -fno-builtin -mavx -fno-omit-frame-pointer --std=c++17 -pg) |
|
add_link_options(-g -O2 -fno-pie -fno-builtin -mavx -fno-omit-frame-pointer --std=c++17 -pg) |
|
|
|
option(USE_RAYLIB "Enable raylib and direct-to-video" OFF) |
|
|
|
# add the executable |
|
IF (USE_RAYLIB) |
|
message("using raylib") |
|
add_subdirectory(lib/raylib) |
|
add_subdirectory(lib/direct-to-video) |
|
ENDIF() |
|
|
|
add_executable(test src/test.cpp src/svector.cpp src/sphfunctions.cpp) |
|
#target_link_libraries(test PUBLIC matplot) |
|
IF (USE_RAYLIB) |
|
add_definitions(-DUSE_RAYLIB) |
|
target_include_directories(test PRIVATE lib/direct-to-video/include) |
|
ENDIF() |
|
|
|
|
|
add_executable(sphash-test src/sphash-test.cpp src/svector.cpp |
|
src/sphfunctions.cpp src/doctest.cpp) |
|
|
|
find_package(OpenMP) |
|
if(OpenMP_CXX_FOUND) |
|
target_link_libraries(test PUBLIC OpenMP::OpenMP_CXX) |
|
target_link_libraries(sphash-test PUBLIC OpenMP::OpenMP_CXX) |
|
endif() |
|
|
|
IF (USE_RAYLIB) |
|
target_link_libraries(test PRIVATE raylib direct-to-video) |
|
ENDIF()
|
|
|