-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
36 lines (30 loc) · 986 Bytes
/
CMakeLists.txt
File metadata and controls
36 lines (30 loc) · 986 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
30
31
32
33
34
35
36
cmake_minimum_required(VERSION 3.16)
project(CVPuzzleSolver LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# OpenMP is used (can be not found on macos) for algorithm speedup via CPU multi-core parallelism, f.e.:
#
# #pragma omp parallel for
# for (int i = 0; i < n; ++i) {
# ... // in such way inner part of code will be executed in parallel
# }
find_package(OpenMP)
if (OpenMP_CXX_FOUND)
message(STATUS "Looking for OpenMP - found")
else()
message(STATUS "Looking for OpenMP - not found")
endif()
include(CTest)
if (BUILD_TESTING)
# Keep gtest lightweight
set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
set(BUILD_GMOCK OFF CACHE BOOL "" FORCE)
# MSVC: avoid CRT mismatch
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
add_subdirectory(third_party/googletest)
endif ()
add_subdirectory(third_party/stb)
add_subdirectory(libs/base)
add_subdirectory(libs/images)
add_subdirectory(src)