uh the fucking tests are fucking compiling :sigh: fuck itgit add *git add *git add *git add *git add *

This commit is contained in:
Jonas Zeunert
2018-06-15 02:30:05 +02:00
parent 70b25595e6
commit ed450b0409
21 changed files with 182 additions and 252 deletions

View File

@@ -4,6 +4,7 @@ project(flippr-driver)
set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") # enable C++11 standard
add_definitions(-lcrypt)
set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/bin)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
@@ -18,37 +19,40 @@ add_library(libwiringPi SHARED IMPORTED )
set_property(TARGET libwiringPi PROPERTY IMPORTED_LOCATION ${LIB_DIR}/libwiringPi.so.2.44)
set_property(TARGET libwiringPi PROPERTY INTERFACE_INCLUDE_DIRECTORIES /home/rhetenor/FlippR/flippr-code/FlippR-Driver/src/lib/wiringPi)
find_package(Threads)
find_package(Boost)
find_package(Threads REQUIRED)
find_package(Boost COMPONENTS system thread timer chrono REQUIRED)
include_directories(${SOURCE_DIR}/input)
include_directories(${SOURCE_DIR}/output)
include_directories(${SOURCE_DIR}/lib)
include_directories(${SOURCE_DIR}/utilities)
include_directories(${Boost_INCLUDE_DIRS})
file(GLOB SOURCES ${SOURCE_DIR}/*/*.?pp)
file(GLOB SOURCES ${SOURCE_DIR}/*/*.cpp)
add_library(flippr_driver STATIC ${SOURCES})
target_link_libraries(flippr_driver ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(flippr_driver ${Boost_LIBRARIES})
target_link_libraries(flippr_driver libwiringPi)
target_link_libraries(flippr_driver Easylogging)
# enable_testing(TRUE)
#
# 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 ${SOURCE_DIR}/../tests)
# include_directories(${TEST_SOURCES})
#
# file(GLOB SOURCES ${TEST_SOURCES}/*/*.cpp)
# file(GLOB HEADER_SOURCES ${TEST_SOURCES}/*/*.hpp)
#
# add_executable(tests ${SOURCES} ${HEADER_SOURCES})
#
# target_link_libraries(tests Easylogging)
# target_link_libraries(tests flippr_driver)
# target_link_libraries(tests Catch)
enable_testing(TRUE)
#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 ${SOURCE_DIR}/../tests)
include_directories(${TEST_SOURCES})
file(GLOB SOURCES ${TEST_SOURCES}/*/*.cpp)
file(GLOB HEADER_SOURCES ${TEST_SOURCES}/*/*.hpp)
add_executable(tests ${SOURCES} ${HEADER_SOURCES})
target_link_libraries(tests Easylogging)
target_link_libraries(tests flippr_driver)
target_link_libraries(tests Catch)