Skip to content

Commit 22590e1

Browse files
committed
Merge pull request #6 from torbjoernk/feature/cmake-boost-travis
adding Boost to CMake and fixing up Travis
2 parents b5f9d3e + 55425e2 commit 22590e1

File tree

4 files changed

+22
-1
lines changed

4 files changed

+22
-1
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ env:
1010
- CMAKE_BUILD_TYPE="Debug"
1111

1212
before_install:
13+
- sudo add-apt-repository ppa:apokluda/boost1.53 --yes
1314
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test --yes # libstdc++-4.8
1415
- if [ "${CXX}" == "clang++" ]; then sudo add-apt-repository --yes ppa:h-rayflood/llvm; fi # clang++-3.2
1516
- sudo apt-get update
1617

1718
install:
1819
- if [ "${CXX}" == "clang++" ]; then sudo apt-get -qq install clang-3.2; fi
19-
- sudo apt-get install g++-4.8; # clang need it for libstdc++ update
20+
- sudo apt-get install g++-4.8 # clang need it for libstdc++ update
21+
- sudo apt-get install libboost1.53-all-dev
2022

2123
before_script:
2224
# update compilers

3rdparty/CMakeLists.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@ set(3rdparty_INCLUDES ${3rdparty_INCLUDES})
33
set(3rdparty_DEPENDEND_LIBS ${3rdparty_DEPENDEND_LIBS})
44
message(STATUS "--------------------------------------------------------------------------------")
55

6+
message(STATUS "Boost")
7+
8+
if(pfasst_BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS)
9+
set(Boost_USE_STATIC_LIBS OFF)
10+
set(pfasst_BUILD_SHARED_LIBS ON)
11+
set(BUILD_SHARED_LIBS ON)
12+
else()
13+
set(Boost_USE_STATIC_LIBS ON)
14+
set(pfasst_BUILD_SHARED_LIBS OFF)
15+
set(BUILD_SHARED_LIBS OFF)
16+
endif()
17+
set(Boost_USE_MULTITHREADED ON)
18+
19+
find_package(Boost REQUIRED)
20+
list(APPEND 3rdparty_INCLUDES ${Boost_INCLUDE_DIRS})
21+
22+
623
if(pfasst_BUILD_EXAMPLES)
724
message(STATUS "FFTW3")
825
set(fftw3_SOURCE_DIR "${pfasst_BINARY_DIR}/3rdparty/src/fftw3")

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ message(STATUS "Configuring 3rd party libraries")
6666
# makes available:
6767
# - fftw3_INCLUDES (if pfasst_BUILD_EXAMPLES)
6868
# - fftw3_LIBS (if pfasst_BUILD_EXAMPLES)
69+
# and Boost headers in 3rdparty_INCLUDES
6970
add_subdirectory(3rdparty)
7071

7172
message(STATUS "********************************************************************************")

examples/advection_diffusion/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
message(STATUS " advection_diffusion")
22
include_directories(
3+
${3rdparty_INCLUDES}
34
${fftw3_INCLUDES}
45
${pfasst_INCLUDES}
56
)

0 commit comments

Comments
 (0)