Skip to content

Commit 46927fb

Browse files
committed
WIP
1 parent 4fd37fb commit 46927fb

File tree

8 files changed

+39
-19
lines changed

8 files changed

+39
-19
lines changed

.travis.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,17 @@ script:
137137
- if [ "$RESOLVE_DEPS_BY" == "manual" ]; then
138138
echo "Build with manually installed dependencies.";
139139
elif [ "$RESOLVE_DEPS_BY" == "conan" ]; then
140+
echo "Build with conan installed dependencies.";
140141
cd $HOME/build;
141142
conan install $GRAYBAT_ROOT --build=missing -s compiler=gcc -s compiler.version=6.2 -s compiler.libcxx=libstdc++;
142-
cmake $CMAKE_FLAGS -DCONAN_DISABLE_CHECK_COMPILER=TRUE $GRAYBAT_ROOT;
143-
make check;
144-
make gbZMQSignaling;
145-
./gbZMQSignaling&;
146-
ctest --output-on-failure;
147-
killall gbZMQSignaling;
148143
fi
144+
- cmake $CMAKE_FLAGS -DCONAN_DISABLE_CHECK_COMPILER=TRUE $GRAYBAT_ROOT
145+
- make check
146+
- make gbZMQSignaling
147+
- ./bin/gbZMQSignaling&
148+
- ctest --output-on-failure
149+
- killall gbZMQSignaling
150+
149151
#- if ["$RESOLVE_DEPS_BY" = "manual"]; then
150152
# cd $HOME/build;
151153
# cmake $CMAKE_FLAGS $GRAYBAT_ROOT;

CMakeLists.txt

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,24 @@ if(${benchmark_FOUND})
3838
set(LIBS ${LIBS} ${benchmark_LIBRARIES})
3939
endif(${benchmark_FOUND})
4040

41+
###############################################################################
42+
# Conan
43+
# - Resolves dependencies of ZMQ
44+
###############################################################################
45+
46+
if(EXISTS "${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
47+
include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
48+
conan_basic_setup()
49+
message("${CMAKE_INCLUDE_PATH}")
50+
message("${CMAKE_LIBRARY_PATH}")
51+
endif()
52+
4153
###############################################################################
4254
# Boost
4355
###############################################################################
44-
#find_package(Boost 1.58.0 COMPONENTS unit_test_framework program_options REQUIRED)
45-
#include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
46-
#include_directories(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/include/graybat/utils/hana/include/")
47-
#set(LIBS ${LIBS} ${Boost_LIBRARIES})
56+
find_package(Boost 1.56.0 COMPONENTS unit_test_framework program_options REQUIRED)
57+
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
58+
set(LIBS ${LIBS} ${Boost_LIBRARIES})
4859

4960
###############################################################################
5061
# Elegant Progressbars for a More Cililized Age
@@ -67,6 +78,7 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
6778
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra")
6879
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpedantic")
6980
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wunused-parameter")
81+
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0")
7082
#set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
7183
endif()
7284

@@ -91,6 +103,7 @@ endif()
91103
###############################################################################
92104
# Targets
93105
###############################################################################
106+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
94107

95108
# Benchmark
96109
file(GLOB BENCHMARKS test/benchmark/*.cpp)
@@ -127,9 +140,9 @@ target_link_libraries(gbZMQSignaling ${LIBS})
127140
enable_testing()
128141
add_test(graybat_check_build "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target check)
129142
add_test(graybat_example_build "${CMAKE_COMMAND}" --build ${CMAKE_BINARY_DIR} --target example)
130-
add_test(graybat_test_run mpiexec -n 2 check )
131-
add_test(graybat_gol_run mpiexec gol 90 4 )
132-
add_test(graybat_pr_run mpiexec pagerank )
143+
add_test(graybat_test_run mpiexec -n 2 bin/check )
144+
add_test(graybat_gol_run mpiexec bin/gol 90 4 )
145+
add_test(graybat_pr_run mpiexec bin/pagerank )
133146
set_tests_properties(graybat_test_run PROPERTIES DEPENDS graybat_check_build)
134147
set_tests_properties(graybat_gol_run PROPERTIES DEPENDS graybat_example_build)
135148
set_tests_properties(graybat_pr_run PROPERTIES DEPENDS graybat_example_build)

conanfile.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ cmake
99

1010
[options]
1111
ZMQ:shared=True
12+
Boost:shared=True

test/integration/CageUT.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818
* If not, see <http://www.gnu.org/licenses/>.
1919
*/
2020

21+
// BOOST
22+
#define BOOST_TEST_DYN_LINK
23+
#include <boost/test/unit_test.hpp>
24+
#include <boost/hana/tuple.hpp>
25+
#include <boost/hana/append.hpp>
26+
2127
// STL
2228
#include <array>
2329
#include <vector>
@@ -26,11 +32,6 @@
2632
#include <cstdlib> /* std::getenv */
2733
#include <string> /* std::string, std::stoi */
2834

29-
// BOOST
30-
#include <boost/test/unit_test.hpp>
31-
#include <boost/hana/tuple.hpp>
32-
#include <boost/hana/append.hpp>
33-
3435
// GRAYBAT
3536
#include <graybat/Cage.hpp>
3637
#include <graybat/communicationPolicy/BMPI.hpp>

test/integration/CommunicationPolicyUT.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
*/
2020

2121
// BOOST
22+
#define BOOST_TEST_DYN_LINK
2223
#include <boost/test/unit_test.hpp>
2324
#include <boost/hana/tuple.hpp>
2425

test/integration/EdgeUT.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
*/
2020

2121
// BOOST
22+
#define BOOST_TEST_DYN_LINK
2223
#include <boost/test/unit_test.hpp>
2324
#include <boost/hana/tuple.hpp>
2425

test/integration/UT.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
* If not, see <http://www.gnu.org/licenses/>.
1919
*/
2020

21-
#define BOOST_TEST_DYN_LINK
2221
#define BOOST_TEST_MODULE "GrayBat Unit Tests"
22+
#define BOOST_TEST_DYN_LINK
2323
#include <boost/test/unit_test.hpp>

test/integration/VertexUT.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
*/
2020

2121
// BOOST
22+
#define BOOST_TEST_DYN_LINK
2223
#include <boost/test/unit_test.hpp>
2324
#include <boost/hana/tuple.hpp>
2425

0 commit comments

Comments
 (0)