-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakelists.txt
27 lines (19 loc) · 894 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
cmake_minimum_required(VERSION 3.14)
project(errores--)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
endif()
add_library(errores-- INTERFACE)
target_include_directories(errores-- INTERFACE fuente)
set(CATCH2_DIR "${CMAKE_SOURCE_DIR}/externos/Catch2")
add_subdirectory(${CATCH2_DIR} ${CMAKE_BINARY_DIR}/catch2-build)
set(UTILES_DIR "${CMAKE_SOURCE_DIR}/externos/utiles.cpp")
target_include_directories(errores-- INTERFACE ${UTILES_DIR}/fuente)
enable_testing()
add_executable(correr_pruebas pruebas/pruebas.cpp)
target_include_directories(correr_pruebas PRIVATE ${CATCH2_DIR}/src)
target_link_libraries(correr_pruebas PRIVATE errores-- Catch2::Catch2WithMain)
set(CMAKE_VERBOSE_MAKEFILE ON)
include(CTest)