-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
28 lines (20 loc) · 746 Bytes
/
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
cmake_minimum_required(VERSION 3.20)
if(UNIX)
set(TOOLCHAIN_PATH "$ENV{HOME}/vcpkg/scripts/buildsystems/vcpkg.cmake")
elseif(WIN32)
set(TOOLCHAIN_PATH "$ENV{HOMEPATH}/vcpkg/scripts/buildsystems/vcpkg.cmake")
endif()
set(CMAKE_TOOLCHAIN_FILE ${TOOLCHAIN_PATH}
CACHE STRING "Vcpkg toolchain file")
project(pwrnum)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Wall /W3 /permissive")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")
endif()
set(PROJECT_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/include")
set(OUTPUT_BINARY_DIR "${CMAKE_SOURCE_DIR}/bin")
find_package(GTest CONFIG REQUIRED)
add_subdirectory(test)