-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
40 lines (32 loc) · 1.08 KB
/
CMakeLists.txt
File metadata and controls
40 lines (32 loc) · 1.08 KB
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
cmake_minimum_required(VERSION 3.20)
# Set the variable for the executable name
set(EXECUTABLE_NAME ComputeSqrtOf42)
project(${EXECUTABLE_NAME} VERSION 1.0)
# Include vcpkg toolchain file
include("$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake")
# Set C++ standard to the latest available
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
# Add your source files
set(SOURCES
src/generator.hpp
src/large_unsigned_integer.hpp
src/large_unsigned_integer.cpp
src/main.cpp
src/spsc_queue.hpp
src/square_root.hpp
src/square_root.cpp
src/utility.hpp
src/test/generator_test.cpp
src/test/large_unsigned_integer_test.cpp
src/test/spsc_queue_test.cpp
src/test/square_root_test.cpp
)
# Create an executable from the source files
add_executable(${EXECUTABLE_NAME} ${SOURCES})
# Specify the location of the vcpkg-installed Catch2 library
find_package(Catch2 CONFIG REQUIRED)
# Link Catch2 to your executable
target_link_libraries(${EXECUTABLE_NAME} PRIVATE Catch2::Catch2)