Commit 3a55c955 authored by Michael Kuron's avatar Michael Kuron
Browse files

Support building without Boost

parent 2975a18b
......@@ -795,6 +795,22 @@ gcc_8_hybrid_dbg:
tags:
- docker
gcc_8_hybrid_dbg_noboost:
  • Why only test it for gcc8? @kuron

  • @eibl, testing with Clang is unnecessary as this is not compiler-dependent, only standard library-dependent. std::experimental::filesystem does not work with Intel as the current version still doesn't support gcc's ABI tags. MSVC is also missing some std::experimental stuff. So the only thing that seems, at first sight, worth adding would be the other gcc versions. I think gcc 5.3 was the first version to include std::experimental::filesystem, so that's the minimum version.

    However, there is no need for even those builds: the normal builds on those version already use the standard library features instead of the Boost features. So the only purpose that this job serves is to check that the build systems handles a missing boost correctly and that the #ifdefs that disable a couple Boost-dependent features are placed correctly.

Please register or sign in to reply
<<: *build_definition
image: i10git.cs.fau.de:5005/walberla/buildenvs/gcc:8
before_script:
- rm -rf /opt/boost /usr/include/boost
variables:
<<: *build_hybrid_dbg_variables
WALBERLA_BUILD_WITH_CUDA: "OFF"
WALBERLA_ENABLE_GUI: 0
WALBERLA_BUILD_WITH_PYTHON: "OFF"
except:
variables:
- $DISABLE_PER_COMMIT_BUILDS
tags:
- docker
gcc_8_hybrid_dbg_sp:
<<: *build_definition
image: i10git.cs.fau.de:5005/walberla/buildenvs/gcc:8
......
......@@ -718,9 +718,18 @@ if ( Boost_FOUND )
list( APPEND LINK_DIRS ${PYTHON_LIBRARY_DIR}/libs )
endif()
set( WALBERLA_BUILD_WITH_BOOST TRUE CACHE INTERNAL "Build with Boost" )
else( Boost_FOUND )
# Search again, this time with the REQUIRED option. This will give a CMAKE error and a detailed error message for the user
find_package ( Boost ${waLBerla_REQUIRED_MIN_BOOST_VERSION} REQUIRED ${waLBerla_REQUIRED_BOOST_COMPONENTS} OPTIONAL_COMPONENTS ${waLBerla_OPTIONAL_BOOST_COMPONENTS} )
if( (WALBERLA_USE_STD_EXPERIMENTAL_FILESYSTEM OR WALBERLA_USE_STD_FILESYSTEM) AND (WALBERLA_USE_STD_EXPERIMENTAL_ANY OR WALBERLA_USE_STD_ANY) AND (WALBERLA_USE_STD_EXPERIMENTAL_OPTIONAL OR WALBERLA_USE_STD_OPTIONAL) AND NOT WALBERLA_BUILD_WITH_PYTHON)
# we don't really need Boost
set( WALBERLA_BUILD_WITH_BOOST FALSE CACHE INTERNAL "Build with Boost" )
else()
# Search again, this time with the REQUIRED option. This will give a CMAKE error and a detailed error message for the user
find_package ( Boost ${waLBerla_REQUIRED_MIN_BOOST_VERSION} REQUIRED ${waLBerla_REQUIRED_BOOST_COMPONENTS} OPTIONAL_COMPONENTS ${waLBerla_OPTIONAL_BOOST_COMPONENTS} )
if( (WALBERLA_USE_STD_EXPERIMENTAL_FILESYSTEM OR WALBERLA_USE_STD_FILESYSTEM) AND (WALBERLA_USE_STD_EXPERIMENTAL_ANY OR WALBERLA_USE_STD_ANY) AND (WALBERLA_USE_STD_EXPERIMENTAL_OPTIONAL OR WALBERLA_USE_STD_OPTIONAL) )
message(WARNING "If you set WALBERLA_BUILD_WITH_PYTHON=OFF, you can build without the Boost library.")
endif()
endif()
endif( Boost_FOUND )
......
......@@ -854,7 +854,7 @@ template< typename T >
inline BlockDataID BlockForest::addBlockData( const shared_ptr< T > & dataHandling, const std::string & identifier,
const Set<SUID> & requiredSelectors, const Set<SUID> & incompatibleSelectors )
{
//static_assert( boost::is_base_of< BlockDataHandling<typename T::value_type>, T >::value );
//static_assert( std::is_base_of< BlockDataHandling<typename T::value_type>, T >::value );
auto downcast = dynamic_pointer_cast< blockforest::BlockDataHandling<typename T::value_type> >( dataHandling );
......
......@@ -19,6 +19,9 @@
//
//======================================================================================================================
#include "waLBerlaDefinitions.h"
#ifdef WALBERLA_BUILD_WITH_BOOST
#include "ConfigToBoostPropertyTree.h"
#include <boost/property_tree/ptree.hpp>
......@@ -51,3 +54,5 @@ boost::property_tree::iptree configToBoostPropertyTree( const Config & config )
} // namespace config
} // namespace walberla
#endif
......@@ -23,5 +23,7 @@
#pragma once
#include "Config.h"
#ifdef WALBERLA_BUILD_WITH_BOOST
#include "ConfigToBoostPropertyTree.h"
#endif
#include "Create.h"
......@@ -19,6 +19,9 @@
//
//======================================================================================================================
#include "waLBerlaDefinitions.h"
#ifdef WALBERLA_BUILD_WITH_BOOST
#include "PhysicalCheck.h"
#include "core/Abort.h"
#include "core/logging/Logging.h"
......@@ -536,3 +539,5 @@ namespace math {
} // namespace math
} // namespace walberla
#endif
......@@ -36,7 +36,9 @@
#include "Matrix3.h"
#include "Parser.h"
#include "ParserOMP.h"
#ifdef WALBERLA_BUILD_WITH_BOOST
#include "PhysicalCheck.h"
#endif
#include "Plane.h"
#include "Primes.h"
#include "Random.h"
......
......@@ -19,6 +19,9 @@
//
//======================================================================================================================
#include "waLBerlaDefinitions.h"
#ifdef WALBERLA_BUILD_WITH_BOOST
#include "Equation.h"
#include "EquationParser.h"
#include "Operator.h"
......@@ -340,3 +343,5 @@ EquationPtr EquationParser::parseEquation( const std::string& str, size_t& index
} // namespace math
} // namespace walberla
#endif
\ No newline at end of file
......@@ -19,6 +19,9 @@
//
//======================================================================================================================
#include "waLBerlaDefinitions.h"
#ifdef WALBERLA_BUILD_WITH_BOOST
#include "Equation.h"
#include "EquationSystem.h"
#include "Variable.h"
......@@ -198,3 +201,5 @@ std::ostream& operator<<( std::ostream& os, EquationSystem& es )
} // namespace math
} // namespace walberla
#endif
......@@ -23,7 +23,9 @@
#pragma once
#include "Equation.h"
#ifdef WALBERLA_BUILD_WITH_BOOST
#include "EquationParser.h"
#include "EquationSystem.h"
#endif
#include "Operator.h"
#include "Variable.h"
\ No newline at end of file
......@@ -19,6 +19,7 @@
// External libraries
#cmakedefine WALBERLA_BUILD_WITH_BOOST
#cmakedefine WALBERLA_BUILD_WITH_MPI
#cmakedefine WALBERLA_BUILD_WITH_OPENMP
#cmakedefine WALBERLA_BUILD_WITH_METIS
......
......@@ -21,12 +21,16 @@ waLBerla_execute_test( NAME CellIntervalTest )
waLBerla_compile_test( FILES config/ConfigTest.cpp )
waLBerla_execute_test( NAME ConfigTest COMMAND $<TARGET_FILE:ConfigTest> ${CMAKE_CURRENT_SOURCE_DIR}/config/ConfigTest.dat )
waLBerla_compile_test( FILES config/PropertyTreeTest.cpp)
#waLBerla_execute_test(NAME PropertyTreeTest COMMAND $<TARGET_FILE:PropertyTreeTest> )
if( WALBERLA_BUILD_WITH_BOOST )
waLBerla_compile_test( FILES config/PropertyTreeTest.cpp)
#waLBerla_execute_test(NAME PropertyTreeTest COMMAND $<TARGET_FILE:PropertyTreeTest> )
endif( WALBERLA_BUILD_WITH_BOOST )
waLBerla_compile_test( FILES config/MultiArrayIOTest.cpp )
waLBerla_execute_test( NAME MultiArrayIOTest COMMAND $<TARGET_FILE:MultiArrayIOTest> )
if( WALBERLA_BUILD_WITH_BOOST )
waLBerla_compile_test( FILES config/MultiArrayIOTest.cpp )
waLBerla_execute_test( NAME MultiArrayIOTest COMMAND $<TARGET_FILE:MultiArrayIOTest> )
endif( WALBERLA_BUILD_WITH_BOOST )
#########
......@@ -84,9 +88,11 @@ waLBerla_execute_test( NAME Matrix3Test )
waLBerla_compile_test( FILES math/GenericAABBTest.cpp DEPENDS stencil domain_decomposition )
waLBerla_execute_test( NAME GenericAABBTest )
waLBerla_compile_test( FILES math/PhysicalCheckTest.cpp DEPENDS stencil )
waLBerla_execute_test( NAME PhysicalCheckTest
COMMAND $<TARGET_FILE:PhysicalCheckTest> ${CMAKE_CURRENT_SOURCE_DIR}/math/PhysicalCheckTestInput.prm )
if( WALBERLA_BUILD_WITH_BOOST )
waLBerla_compile_test( FILES math/PhysicalCheckTest.cpp DEPENDS stencil )
waLBerla_execute_test( NAME PhysicalCheckTest
COMMAND $<TARGET_FILE:PhysicalCheckTest> ${CMAKE_CURRENT_SOURCE_DIR}/math/PhysicalCheckTestInput.prm )
endif( WALBERLA_BUILD_WITH_BOOST )
waLBerla_compile_test( FILES math/FastInvSqrtTest.cpp )
......@@ -96,8 +102,10 @@ waLBerla_execute_test( NAME FastInvSqrtTest )
# math/equation_system #
########################
waLBerla_compile_test( FILES math/equation_system/EquationSolverTest.cpp )
waLBerla_execute_test( NAME EquationSolverTest )
if( WALBERLA_BUILD_WITH_BOOST )
waLBerla_compile_test( FILES math/equation_system/EquationSolverTest.cpp )
waLBerla_execute_test( NAME EquationSolverTest )
endif( WALBERLA_BUILD_WITH_BOOST )
#######
# mpi #
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment