-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
34 lines (25 loc) · 934 Bytes
/
CMakeLists.txt
File metadata and controls
34 lines (25 loc) · 934 Bytes
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
29
30
31
32
33
34
cmake_minimum_required(VERSION 2.8.2)
project(ogss_test_cpp)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -pedantic")
################################
# OGSS/C++ common
################################
ADD_SUBDIRECTORY(lib/ogss.common.cpp)
include_directories(lib/ogss.common.cpp)
################################
# GTest
################################
ADD_SUBDIRECTORY(lib/gtest)
enable_testing()
include_directories(${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR})
################################
# Unit Tests
################################
#implementation
file(GLOB_RECURSE SOURCE_FILES LIST_DIRECTORIES false src/*.cpp)
#actual tests
file(GLOB_RECURSE TEST_FILES LIST_DIRECTORIES false test/*.cpp)
add_executable(runTests ${SOURCE_FILES} ${TEST_FILES})
# Link test executable against gtest & gtest_main
target_link_libraries(runTests ogss.common.cpp gtest gtest_main)
add_test(runTests runTests)