Created
January 16, 2023 20:19
-
-
Save HectorTorres/747ea0b79da35d8fb4e6f25cc7dd6e67 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Se requiere definir una version minima de cmake, por compatibilidad | |
cmake_minimum_required(VERSION 3.22) | |
# Se requiere definir un nombre de proyecto. | |
project("Gtest") | |
# Buscar el paquete GTest | |
find_package(GTest REQUIRED) | |
# Vincular el archivo de salida con el de pruebas | |
add_executable(a.out test.cpp) | |
# Vincular las bibliotecas requeridas | |
target_link_libraries(a.out ${GTEST_LIBRARIES}) | |
# Probar de manera automatica | |
enable_testing() | |
add_test(add a.out) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment