pulling up call to find_packages
eliminates multiple calls to find_packages
This commit is contained in:
@@ -44,6 +44,17 @@ ENDIF (NOT BUILD_PY_LIB)
|
|||||||
add_subdirectory(src/outfile)
|
add_subdirectory(src/outfile)
|
||||||
|
|
||||||
IF (BUILD_TESTING)
|
IF (BUILD_TESTING)
|
||||||
|
#Prep ourselves for compiling boost
|
||||||
|
IF(WIN32)
|
||||||
|
set(Boost_USE_STATIC_LIBS ON)
|
||||||
|
ELSE(TRUE)
|
||||||
|
set(Boost_USE_STATIC_LIBS OFF)
|
||||||
|
add_definitions(-DBOOST_ALL_DYN_LINK)
|
||||||
|
ENDIF(WIN32)
|
||||||
|
|
||||||
|
find_package(Boost COMPONENTS unit_test_framework system thread filesystem)
|
||||||
|
include_directories (${Boost_INCLUDE_DIRS})
|
||||||
|
|
||||||
enable_testing()
|
enable_testing()
|
||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
add_subdirectory(tests/outfile)
|
add_subdirectory(tests/outfile)
|
||||||
|
|||||||
@@ -7,8 +7,6 @@
|
|||||||
# US EPA ORD/NRMRL
|
# US EPA ORD/NRMRL
|
||||||
#
|
#
|
||||||
|
|
||||||
#Setup CMake to run tests
|
|
||||||
enable_testing()
|
|
||||||
|
|
||||||
# Sets for output directory for executables and libraries.
|
# Sets for output directory for executables and libraries.
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
@@ -17,18 +15,6 @@ if(UNIX)
|
|||||||
set(CMAKE_CXX_FLAGS "-std=c++11")
|
set(CMAKE_CXX_FLAGS "-std=c++11")
|
||||||
endif(UNIX)
|
endif(UNIX)
|
||||||
|
|
||||||
#Prep ourselves for compiling boost
|
|
||||||
IF(WIN32)
|
|
||||||
set(Boost_USE_STATIC_LIBS ON)
|
|
||||||
ELSE(TRUE)
|
|
||||||
set(Boost_USE_STATIC_LIBS OFF)
|
|
||||||
add_definitions(-DBOOST_ALL_DYN_LINK)
|
|
||||||
ENDIF(WIN32)
|
|
||||||
|
|
||||||
set(Boost_THREAD_FOUND OFF)
|
|
||||||
find_package(Boost COMPONENTS unit_test_framework system thread filesystem)
|
|
||||||
include_directories (${Boost_INCLUDE_DIRS})
|
|
||||||
|
|
||||||
|
|
||||||
set(toolkit_test_srcs
|
set(toolkit_test_srcs
|
||||||
test_toolkit.cpp
|
test_toolkit.cpp
|
||||||
|
|||||||
@@ -1,28 +1,14 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
enable_testing()
|
|
||||||
|
|
||||||
# Sets for output directory for executables and libraries
|
# Sets for output directory for executables and libraries
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||||
|
|
||||||
|
|
||||||
#Prep ourselves for compiling boost
|
|
||||||
IF(WIN32)
|
|
||||||
set(Boost_USE_STATIC_LIBS ON)
|
|
||||||
ELSE(TRUE)
|
|
||||||
set(Boost_USE_STATIC_LIBS OFF)
|
|
||||||
add_definitions(-DBOOST_ALL_DYN_LINK)
|
|
||||||
ENDIF(WIN32)
|
|
||||||
|
|
||||||
find_package(Boost COMPONENTS unit_test_framework)
|
|
||||||
include_directories (${Boost_INCLUDE_DIRS} ../../src/outfile/include)
|
|
||||||
|
|
||||||
|
|
||||||
add_executable(test_output test_output.cpp)
|
add_executable(test_output test_output.cpp)
|
||||||
|
target_include_directories(test_output PUBLIC ../../src/outfile/include)
|
||||||
target_link_libraries(test_output ${Boost_LIBRARIES} epanet-output)
|
target_link_libraries(test_output ${Boost_LIBRARIES} epanet-output)
|
||||||
|
|
||||||
add_test(NAME test_output
|
add_test(NAME test_output
|
||||||
|
|||||||
@@ -1,32 +1,19 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
enable_testing()
|
|
||||||
|
|
||||||
# Sets for output directory for executables and libraries
|
# Sets for output directory for executables and libraries
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||||
|
|
||||||
|
|
||||||
#Prep ourselves for compiling boost
|
|
||||||
IF(WIN32)
|
|
||||||
set(Boost_USE_STATIC_LIBS ON)
|
|
||||||
ELSE(TRUE)
|
|
||||||
set(Boost_USE_STATIC_LIBS OFF)
|
|
||||||
add_definitions(-DBOOST_ALL_DYN_LINK)
|
|
||||||
ENDIF(WIN32)
|
|
||||||
|
|
||||||
find_package(Boost COMPONENTS unit_test_framework)
|
|
||||||
include_directories (${Boost_INCLUDE_DIRS} ../../src/)
|
|
||||||
|
|
||||||
set (test_source
|
set (test_source
|
||||||
./test_errormanager.cpp
|
./test_errormanager.cpp
|
||||||
../../src/util/errormanager.c
|
../../src/util/errormanager.c
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(test_errormanager ${test_source})
|
add_executable(test_errormanager ${test_source})
|
||||||
|
target_include_directories(test_errormanager PUBLIC ../../src/)
|
||||||
target_link_libraries(test_errormanager ${Boost_LIBRARIES})
|
target_link_libraries(test_errormanager ${Boost_LIBRARIES})
|
||||||
|
|
||||||
add_test(NAME test_errormanager
|
add_test(NAME test_errormanager
|
||||||
|
|||||||
Reference in New Issue
Block a user