cmakelists

This commit is contained in:
Jonas Zeunert
2018-06-07 20:24:54 +02:00
parent 2ba228a3fa
commit f9536933a1
3 changed files with 45 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
cmake_minimum_required(VERSION 3.0)
project(cmake_test)
# Prepare "Catch" library for other executables
set(CATCH_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../src/tests)
add_library(Catch INTERFACE)
target_include_directories(Catch INTERFACE ${CATCH_INCLUDE_DIR}/*)
# Make test executable
set(TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../../src/tests/input)
include_directories(${TEST_SOURCES})
include_directories(${TEST_SOURCES}/mocks)
file(GLOB SOURCES ${TEST_SOURCES}/*.cpp)
add_executable(tests ${SOURCES})
target_link_libraries(tests Catch)

View File

@@ -0,0 +1,18 @@
cmake_minimum_required(VERSION 3.0)
project(cmake_test)
# Prepare "Catch" library for other executables
set(CATCH_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../src/tests)
add_library(Catch INTERFACE)
target_include_directories(Catch INTERFACE ${CATCH_INCLUDE_DIR}/*)
# Make test executable
set(TEST_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/../../src/tests/input)
include_directories(${TEST_SOURCES})
include_directories(${TEST_SOURCES}/mocks)
file(GLOB SOURCES ${TEST_SOURCES}/*.cpp)
add_executable(tests ${SOURCES})
target_link_libraries(tests Catch)

View File

@@ -0,0 +1,9 @@
/*
* tests-main.cpp
*
* Created on: May 6, 2018
* Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert, Rafael Vinci, Dr. Franca Rupprecht
*/
#define CATCH_CONFIG_MAIN
#include "../catch.hpp"