Fixing test build on gcc
This commit is contained in:
@@ -9,11 +9,19 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
|
||||
|
||||
set (Boost_USE_STATIC_LIBS OFF)
|
||||
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/outfile/include)
|
||||
|
||||
|
||||
add_executable(test_errormanager test_output.cpp)
|
||||
add_executable(test_output test_output.cpp)
|
||||
|
||||
target_link_libraries(test_errormanager ${Boost_LIBRARIES} epanet-output)
|
||||
target_link_libraries(test_output ${Boost_LIBRARIES} epanet-output)
|
||||
|
||||
add_test(NAME test_output
|
||||
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_output
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data)
|
||||
|
||||
BIN
tests/outfile/data/example1.out
Normal file
BIN
tests/outfile/data/example1.out
Normal file
Binary file not shown.
@@ -8,13 +8,7 @@
|
||||
* Unit testing for EPANET Output API.
|
||||
*/
|
||||
|
||||
// NOTE: Travis installs libboost test version 1.5.4
|
||||
// NOTE: Can not dyn link boost using Visual Studio 10 2010
|
||||
//#define BOOST_TEST_DYN_LINK
|
||||
|
||||
|
||||
#define BOOST_TEST_MODULE "output"
|
||||
#define BOOST_TEST_DYN_LINK
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
Reference in New Issue
Block a user