cmakelists
This commit is contained in:
18
FlippR-Driver/build/tests/CMakeLists.txt
Normal file
18
FlippR-Driver/build/tests/CMakeLists.txt
Normal 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)
|
||||
18
FlippR-Driver/src/tests/CMakeLists.txt
Normal file
18
FlippR-Driver/src/tests/CMakeLists.txt
Normal 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)
|
||||
9
FlippR-Driver/src/tests/input/main.cpp
Normal file
9
FlippR-Driver/src/tests/input/main.cpp
Normal 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"
|
||||
Reference in New Issue
Block a user