Fixing test build on gcc

This commit is contained in:
Michael Tryby
2019-03-21 18:08:05 -04:00
parent 0c56df4041
commit 48facd89d0
21 changed files with 47 additions and 43 deletions

View File

@@ -1,10 +1,20 @@
cmake_minimum_required(VERSION 3.12)
enable_testing()
set (Boost_USE_STATIC_LIBS OFF)
# Sets for output directory for executables and libraries
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
IF(MSVC)
set (Boost_USE_STATIC_LIBS OFF)
add_definitions(-DBOOST_ALL_DYN_LINK)
ENDIF(MSVC)
find_package(Boost COMPONENTS unit_test_framework)
include_directories (${Boost_INCLUDE_DIRS} ../../src/)
@@ -16,3 +26,6 @@ set (test_source
add_executable(test_errormanager ${test_source})
target_link_libraries(test_errormanager ${Boost_LIBRARIES})
add_test(NAME test_errormanager
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_errormanager)