Commit 9b2dea31 authored by Anton Gladky's avatar Anton Gladky

Drop including "yade/" folder in cpp and hpp files.

Many years we had a symlink in build-dir "yade" which
points to a source dir. It was neccessary for scons build
system, which is not the case at the moment. All headers
must be included directly without "yade/" prefix, e.g.:

<core/Scene.hpp>
<pkg/common/Sphere.hpp>
parent 4a8fdb77
......@@ -63,6 +63,8 @@ ENDIF()
#===========================================================
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR})
#===========================================================
#===========================================================
......@@ -426,13 +428,6 @@ ENDIF(ENABLE_GUI)
ADD_SUBDIRECTORY("${CMAKE_SOURCE_DIR}/py")
#===========================================================
# this is only a temporary hack, headers should be installed in the build-dir directly
# perhaps there is a proper way, have to ask
IF(NOT EXISTS "${CMAKE_BINARY_DIR}/yade")
EXECUTE_PROCESS(COMMAND ln -s ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}/yade)
ENDIF ()
#===========================================================
FILE(GLOB SRC_CORE "core/*.cpp")
FILE(GLOB_RECURSE SRC_PKG "pkg/*.cpp")
FILE(GLOB SRC_LIB "lib/*.cpp")
......
......@@ -4346,7 +4346,7 @@ Václav Šmilauer (208):
Quick fix for recently discovered segfault. Wondering why it didn't surface before. Valgrind still complains about PhysicalActionVectorVectorIterator::increment using an unitialized value, but that may be unrelated (probably is) to this one.
SCons update, please use it and report any problems to yade-dev or yade-users. Thanks.
Iterations/sec display added to simulation controller (someone more sensible may redesign the layout in the future). Line ending changed from CRLF to CR.
Scons accepts additional POSTFIX parameter, which will alter installation so that PREFIX/{bin,lib}/yade becomes PREFIX/{bin,lib}/yadePOSTFIX (similar to EXTRAVERSION of Linux). Further, configuration files will be searched for in ~/.yadePOSTFIX instead of ~/.yade. Unfortunately, headers installed in PREFIX will still be overwritten by newer version, even with different POSTFIX, since most files do something like #include<yade/...>. This is meant to ease simultaneous installations of different variants of yade. To achieve full independence, PREFIX and POSTFIX should be different. Note that you don't need to set LD_LIBRARY_PATH, since scons uses linker's -rpath option (hint: man ld). If someone has better solution, please let me know.
Scons accepts additional POSTFIX parameter, which will alter installation so that PREFIX/{bin,lib}/yade becomes PREFIX/{bin,lib}/yadePOSTFIX (similar to EXTRAVERSION of Linux). Further, configuration files will be searched for in ~/.yadePOSTFIX instead of ~/.yade. Unfortunately, headers installed in PREFIX will still be overwritten by newer version, even with different POSTFIX, since most files do something like #include<...>. This is meant to ease simultaneous installations of different variants of yade. To achieve full independence, PREFIX and POSTFIX should be different. Note that you don't need to set LD_LIBRARY_PATH, since scons uses linker's -rpath option (hint: man ld). If someone has better solution, please let me know.
Microchange to comment on naming of scons configuration options.
SConscruct file update - make it work with older scons, remove -floop-optimize2 that doesn't exist for older gcc (<4.0).
Hunted down the bugwith node enumeration, now should be reliable. Added some checks so that configuration is not done when cleaning, likewise for installable nodes (so we do NOT uninstall upon cleaning). If you use g++-3.3, you need to set e.g. CXX="distcc g++-3.3 -pthread". This will be fixed perhaps in the future but for now the default is to keep it simple.
......
#include<yade/core/Body.hpp>
#include<yade/core/Scene.hpp>
#include<yade/core/Omega.hpp>
#include<yade/core/InteractionContainer.hpp>
#include<core/Body.hpp>
#include<core/Scene.hpp>
#include<core/Omega.hpp>
#include<core/InteractionContainer.hpp>
//! This could be -1 if id_t is re-typedef'ed as `int'
const Body::id_t Body::ID_NONE=Body::id_t(-1);
......
......@@ -14,9 +14,9 @@
#include"State.hpp"
#include"Material.hpp"
#include<yade/lib/base/Math.hpp>
#include<yade/lib/serialization/Serializable.hpp>
#include<yade/lib/multimethods/Indexable.hpp>
#include<lib/base/Math.hpp>
#include<lib/serialization/Serializable.hpp>
#include<lib/multimethods/Indexable.hpp>
......
......@@ -4,7 +4,7 @@
#pragma once
#include<yade/lib/serialization/Serializable.hpp>
#include<lib/serialization/Serializable.hpp>
#include<boost/tuple/tuple.hpp>
class Body;
......
......@@ -7,10 +7,10 @@
*************************************************************************/
#pragma once
#include<yade/lib/base/Math.hpp>
#include<yade/lib/serialization/Serializable.hpp>
#include<yade/lib/multimethods/Indexable.hpp>
#include<yade/core/Dispatcher.hpp>
#include<lib/base/Math.hpp>
#include<lib/serialization/Serializable.hpp>
#include<lib/multimethods/Indexable.hpp>
#include<core/Dispatcher.hpp>
/*! Interface for approximate body locations in space
......
#include<yade/core/Cell.hpp>
#include<core/Cell.hpp>
CREATE_LOGGER(Cell);
......
......@@ -13,10 +13,10 @@ The transformation is split between "normal" part and "rotation/shear" part for
#pragma once
#include<yade/lib/serialization/Serializable.hpp>
#include<yade/lib/base/Math.hpp>
#include<lib/serialization/Serializable.hpp>
#include<lib/base/Math.hpp>
//#include<yade/pkg/dem/Shop.hpp>
//#include<pkg/dem/Shop.hpp>
class Cell: public Serializable{
public:
......
// (c) 2007-2010 Vaclav Smilauer <eudoxos@arcig.cz>
#include"Clump.hpp"
#include<yade/core/Scene.hpp>
#include<yade/core/BodyContainer.hpp>
#include<yade/core/State.hpp>
#include<yade/pkg/common/Sphere.hpp>
#include<core/Scene.hpp>
#include<core/BodyContainer.hpp>
#include<core/State.hpp>
#include<pkg/common/Sphere.hpp>
YADE_PLUGIN((Clump));
CREATE_LOGGER(Clump);
......
......@@ -2,10 +2,10 @@
#pragma once
#include<yade/core/Body.hpp>
#include<yade/lib/base/Logging.hpp>
#include<yade/lib/base/Math.hpp>
#include<yade/core/PartialEngine.hpp>
#include<core/Body.hpp>
#include<lib/base/Logging.hpp>
#include<lib/base/Math.hpp>
#include<core/PartialEngine.hpp>
/*! Body representing clump (rigid aggregate) composed by other existing bodies.
......
......@@ -9,10 +9,10 @@
#pragma once
#include<yade/core/Engine.hpp>
#include<yade/core/Functor.hpp>
#include<yade/core/Omega.hpp>
#include<yade/lib/multimethods/DynLibDispatcher.hpp>
#include<core/Engine.hpp>
#include<core/Functor.hpp>
#include<core/Omega.hpp>
#include<lib/multimethods/DynLibDispatcher.hpp>
#include<boost/preprocessor/cat.hpp>
......
#pragma once
#include<yade/lib/base/openmp-accu.hpp>
#include<yade/lib/serialization/Serializable.hpp>
#include<lib/base/openmp-accu.hpp>
#include<lib/serialization/Serializable.hpp>
namespace py=boost::python;
......
......@@ -10,10 +10,10 @@
#pragma once
#include<yade/lib/serialization/Serializable.hpp>
#include<yade/core/Omega.hpp>
#include<yade/core/Timing.hpp>
#include<yade/lib/base/Logging.hpp>
#include<lib/serialization/Serializable.hpp>
#include<core/Omega.hpp>
#include<core/Timing.hpp>
#include<lib/base/Logging.hpp>
class Body;
class Scene;
......
......@@ -3,10 +3,10 @@
* GNU General Public License v2 or later. See file LICENSE for details. *
*************************************************************************/
#include<yade/core/Omega.hpp>
#include<core/Omega.hpp>
#include<boost/date_time/posix_time/posix_time.hpp>
#include<yade/lib/pyutil/gil.hpp>
#include<yade/lib/serialization/ObjectIO.hpp>
#include<lib/pyutil/gil.hpp>
#include<lib/serialization/ObjectIO.hpp>
#include"FileGenerator.hpp"
......
......@@ -8,8 +8,8 @@
#pragma once
#include<yade/lib/serialization/Serializable.hpp>
#include<yade/lib/base/Logging.hpp>
#include<lib/serialization/Serializable.hpp>
#include<lib/base/Logging.hpp>
#include "Scene.hpp"
#include "ThreadWorker.hpp"
......
// 2009 © Václav Šmilauer <eudoxos@arcig.cz>
#pragma once
#include<yade/lib/base/Math.hpp>
#include<yade/core/Body.hpp>
#include<lib/base/Math.hpp>
#include<core/Body.hpp>
#include<boost/static_assert.hpp>
// make sure that (void*)&vec[0]==(void*)&vec
......
......@@ -10,7 +10,7 @@
#include "Omega.hpp"
#include<yade/lib/factory/Factorable.hpp>
#include<lib/factory/Factorable.hpp>
class FrontEnd : public Factorable
{
......
......@@ -10,9 +10,9 @@
#pragma once
#include<yade/lib/serialization/Serializable.hpp>
#include<yade/lib/multimethods/FunctorWrapper.hpp>
#include<yade/core/Timing.hpp>
#include<lib/serialization/Serializable.hpp>
#include<lib/multimethods/FunctorWrapper.hpp>
#include<core/Timing.hpp>
class TimingDeltas;
class Scene;
......
......@@ -2,7 +2,7 @@
//
// 2009 © Václav Šmilauer <eudoxos@arcig.cz>
#include<yade/core/Serializable.hpp>
#include<core/Serializable.hpp>
/*! Storage for general 3d view settings.
Is saved along with simulation and passed to every call to render(...).
......
......@@ -8,10 +8,10 @@
#pragma once
#include<yade/lib/base/Math.hpp>
#include<yade/lib/serialization/Serializable.hpp>
#include<yade/lib/multimethods/Indexable.hpp>
#include<yade/core/Dispatcher.hpp>
#include<lib/base/Math.hpp>
#include<lib/serialization/Serializable.hpp>
#include<lib/multimethods/Indexable.hpp>
#include<core/Dispatcher.hpp>
class IGeom : public Serializable, public Indexable
{
......
......@@ -8,10 +8,10 @@
#pragma once
#include<yade/lib/base/Math.hpp>
#include<yade/lib/serialization/Serializable.hpp>
#include<yade/lib/multimethods/Indexable.hpp>
#include<yade/core/Dispatcher.hpp>
#include<lib/base/Math.hpp>
#include<lib/serialization/Serializable.hpp>
#include<lib/multimethods/Indexable.hpp>
#include<core/Dispatcher.hpp>
class IPhys : public Serializable, public Indexable
{
......
......@@ -10,7 +10,7 @@
#include"Interaction.hpp"
#include<yade/core/Scene.hpp>
#include<core/Scene.hpp>
Interaction::Interaction(Body::id_t newId1,Body::id_t newId2): id1(newId1), id2(newId2), cellDist(Vector3i(0,0,0)){ reset(); }
......
#pragma once
#include<yade/lib/serialization/Serializable.hpp>
#include<lib/serialization/Serializable.hpp>
// keep those two here, template instantiation & boost::python gets broken otherwise, e.g. https://bugs.launchpad.net/bugs/618766
#include<yade/core/IGeom.hpp>
#include<yade/core/IPhys.hpp>
#include<yade/core/Body.hpp>
#include<core/IGeom.hpp>
#include<core/IPhys.hpp>
#include<core/Body.hpp>
class IGeomFunctor;
......
......@@ -4,15 +4,15 @@
#pragma once
#include<yade/lib/serialization/Serializable.hpp>
#include<lib/serialization/Serializable.hpp>
#include<boost/thread/mutex.hpp>
#ifdef YADE_OPENMP
#include<omp.h>
#endif
#include<yade/core/Interaction.hpp>
#include<yade/core/BodyContainer.hpp>
#include<core/Interaction.hpp>
#include<core/BodyContainer.hpp>
/* This InteractionContainer implementation has reference to the body container and
stores interactions in 2 places:
......
#include<stdexcept>
#include<yade/core/Material.hpp>
#include<yade/core/Scene.hpp>
#include<core/Material.hpp>
#include<core/Scene.hpp>
const shared_ptr<Material> Material::byId(int id, Scene* w_){
Scene* w=w_?w_:Omega::instance().getScene().get();
......
// 2009 © Václav Šmilauer <eudoxos@arcig.cz>
#pragma once
#include<yade/lib/serialization/Serializable.hpp>
#include<yade/lib/multimethods/Indexable.hpp>
#include<yade/core/State.hpp>
#include<yade/core/Dispatcher.hpp>
#include<lib/serialization/Serializable.hpp>
#include<lib/multimethods/Indexable.hpp>
#include<core/State.hpp>
#include<core/Dispatcher.hpp>
class Scene;
......
......@@ -12,13 +12,13 @@
#include"Scene.hpp"
#include"TimeStepper.hpp"
#include"ThreadRunner.hpp"
#include<yade/lib/base/Math.hpp>
#include<yade/lib/multimethods/FunctorWrapper.hpp>
#include<yade/lib/multimethods/Indexable.hpp>
#include<lib/base/Math.hpp>
#include<lib/multimethods/FunctorWrapper.hpp>
#include<lib/multimethods/Indexable.hpp>
#include<boost/algorithm/string.hpp>
#include<boost/thread/mutex.hpp>
#include<yade/lib/serialization/ObjectIO.hpp>
#include<lib/serialization/ObjectIO.hpp>
#include<cxxabi.h>
......
......@@ -17,10 +17,10 @@
#include <boost/thread/thread.hpp>
#include <iostream>
#include <yade/lib/base/Math.hpp>
#include <yade/lib/factory/ClassFactory.hpp>
#include <lib/base/Math.hpp>
#include <lib/factory/ClassFactory.hpp>
#include <yade/lib/base/Singleton.hpp>
#include <lib/base/Singleton.hpp>
#include "SimulationFlow.hpp"
......
......@@ -8,8 +8,8 @@
#pragma once
#include <vector>
#include<yade/core/Engine.hpp>
#include<yade/core/Body.hpp>
#include<core/Engine.hpp>
#include<core/Body.hpp>
class PartialEngine: public Engine{
public:
......
......@@ -9,16 +9,16 @@
*************************************************************************/
#include"Scene.hpp"
#include<yade/core/Engine.hpp>
#include<yade/core/Timing.hpp>
#include<yade/core/TimeStepper.hpp>
#include<core/Engine.hpp>
#include<core/Timing.hpp>
#include<core/TimeStepper.hpp>
#include<yade/lib/base/Math.hpp>
#include<lib/base/Math.hpp>
#include<boost/date_time/posix_time/posix_time.hpp>
#include<boost/algorithm/string.hpp>
#include<yade/core/BodyContainer.hpp>
#include<yade/core/InteractionContainer.hpp>
#include<core/BodyContainer.hpp>
#include<core/InteractionContainer.hpp>
// POSIX-only
......
......@@ -10,15 +10,15 @@
#pragma once
#include<yade/core/Body.hpp>
#include<yade/core/Cell.hpp>
#include<yade/core/BodyContainer.hpp>
#include<yade/core/Engine.hpp>
#include<yade/core/Material.hpp>
#include<yade/core/DisplayParameters.hpp>
#include<yade/core/ForceContainer.hpp>
#include<yade/core/InteractionContainer.hpp>
#include<yade/core/EnergyTracker.hpp>
#include<core/Body.hpp>
#include<core/Cell.hpp>
#include<core/BodyContainer.hpp>
#include<core/Engine.hpp>
#include<core/Material.hpp>
#include<core/DisplayParameters.hpp>
#include<core/ForceContainer.hpp>
#include<core/InteractionContainer.hpp>
#include<core/EnergyTracker.hpp>
#ifndef HOST_NAME_MAX
#define HOST_NAME_MAX 255
......
......@@ -8,9 +8,9 @@
#pragma once
#include<yade/lib/serialization/Serializable.hpp>
#include<yade/lib/multimethods/Indexable.hpp>
#include<yade/core/Dispatcher.hpp>
#include<lib/serialization/Serializable.hpp>
#include<lib/multimethods/Indexable.hpp>
#include<core/Dispatcher.hpp>
#define BV_FUNCTOR_CACHE
......
......@@ -6,7 +6,7 @@
* GNU General Public License v2 or later. See file LICENSE for details. *
*************************************************************************/
#include <yade/lib/base/Logging.hpp>
#include <lib/base/Logging.hpp>
#include "SimulationFlow.hpp"
#include "Scene.hpp"
#include "Omega.hpp"
......
// 2009 © Václav Šmilauer <eudoxos@arcig.cz>
#include<yade/core/State.hpp>
#include<core/State.hpp>
CREATE_LOGGER(State);
......
// 2009 © Václav Šmilauer <eudoxos@arcig.cz>
#pragma once
#include<yade/lib/serialization/Serializable.hpp>
#include<yade/lib/multimethods/Indexable.hpp>
#include<yade/core/Dispatcher.hpp>
#include<lib/serialization/Serializable.hpp>
#include<lib/multimethods/Indexable.hpp>
#include<core/Dispatcher.hpp>
// delete later and remove relevant code, to not support old State.blockedDOFs=['x','y','rz'] syntax anymore
//#define YADE_DEPREC_DOF_LIST
......
......@@ -6,7 +6,7 @@
* GNU General Public License v2 or later. See file LICENSE for details. *
*************************************************************************/
#include <yade/lib/base/Logging.hpp>
#include <lib/base/Logging.hpp>
#include "ThreadRunner.hpp"
#include "ThreadWorker.hpp"
......
#include<yade/lib/factory/ClassFactory.hpp>
#include<lib/factory/ClassFactory.hpp>
// make core classes known to the class factory
#include<yade/core/Body.hpp>
#include<yade/core/BodyContainer.hpp>
#include<yade/core/Bound.hpp>
#include<yade/core/Cell.hpp>
#include<yade/core/Dispatcher.hpp>
#include<yade/core/EnergyTracker.hpp>
#include<yade/core/Engine.hpp>
#include<yade/core/FileGenerator.hpp>
#include<yade/core/Functor.hpp>
#include<yade/core/GlobalEngine.hpp>
#include<yade/core/Interaction.hpp>
#include<yade/core/InteractionContainer.hpp>
#include<yade/core/IGeom.hpp>
#include<yade/core/IPhys.hpp>
#include<yade/core/Material.hpp>
#include<yade/core/PartialEngine.hpp>
#include<yade/core/Shape.hpp>
#include<yade/core/State.hpp>
#include<yade/core/TimeStepper.hpp>
#include<core/Body.hpp>
#include<core/BodyContainer.hpp>
#include<core/Bound.hpp>
#include<core/Cell.hpp>
#include<core/Dispatcher.hpp>
#include<core/EnergyTracker.hpp>
#include<core/Engine.hpp>
#include<core/FileGenerator.hpp>
#include<core/Functor.hpp>
#include<core/GlobalEngine.hpp>
#include<core/Interaction.hpp>
#include<core/InteractionContainer.hpp>
#include<core/IGeom.hpp>
#include<core/IPhys.hpp>
#include<core/Material.hpp>
#include<core/PartialEngine.hpp>
#include<core/Shape.hpp>
#include<core/State.hpp>
#include<core/TimeStepper.hpp>
// these two are not accessible from python directly (though they should be in the future, perhaps)
......
#include<yade/core/Omega.hpp>
#include<yade/lib/base/Logging.hpp>
#include<core/Omega.hpp>
#include<lib/base/Logging.hpp>
#include<signal.h>
......
......@@ -42,14 +42,14 @@ directory are joind by dash, deeper levels are discarded (in case of ``core`` an
============================================================= =========================
Original header location Included as
============================================================= =========================
``core/Scene.hpp`` ``<yade/core/Scene.hpp>``
``lib/base/Logging.hpp`` ``<yade/lib-base/Logging.hpp>``
``lib/serialization/Serializable.hpp`` ``<yade/lib-serialization/Serializable.hpp>``
``pkg/dem/DataClass/SpherePack.hpp`` ``<yade/pkg-dem/SpherePack.hpp>``
``gui/qt3/QtGUI.hpp`` ``<yade/gui-qt3/QtGUI.hpp>``
``core/Scene.hpp`` ``<core/Scene.hpp>``
``lib/base/Logging.hpp`` ``<lib-base/Logging.hpp>``
``lib/serialization/Serializable.hpp`` ``<lib-serialization/Serializable.hpp>``
``pkg/dem/DataClass/SpherePack.hpp`` ``<pkg-dem/SpherePack.hpp>``
``gui/qt3/QtGUI.hpp`` ``<gui-qt3/QtGUI.hpp>``
============================================================= =========================
It is advised to use ``#include<yade/module/Class.hpp>`` style of inclusion rather than ``#include"Class.hpp`` even if you are in the same directory.
It is advised to use ``#include<module/Class.hpp>`` style of inclusion rather than ``#include"Class.hpp`` even if you are in the same directory.
Automatic compilation
......@@ -541,8 +541,8 @@ and this is the implementation:
.. code-block:: c++
#include<yade/pkg-common/GravityEngine.hpp>
#include<yade/core/Scene.hpp>
#include<pkg-common/GravityEngine.hpp>
#include<core/Scene.hpp>
// registering the plugin
YADE_PLUGIN((GravityEngine));
......@@ -756,7 +756,7 @@ additionally, you *have* to allocate memory for static data members in the ``.cp
.. code-block: c++
/* in the .cpp file */
#include<yade/pkg-something/HeaderFile.hpp>
#include<pkg-something/HeaderFile.hpp>
/* allocate memory for static attrs;
no need to assign initial value, that is done from
(hidden) initialization function at class registration
......
......@@ -11,17 +11,17 @@
#include"GLViewer.hpp"
#include"OpenGLManager.hpp"
#include<yade/lib/opengl/OpenGLWrapper.hpp>
#include<yade/core/Body.hpp>
#include<yade/core/Scene.hpp>
#include<yade/core/Interaction.hpp>
#include<yade/core/DisplayParameters.hpp>
#include<lib/opengl/OpenGLWrapper.hpp>
#include<core/Body.hpp>
#include<core/Scene.hpp>
#include<core/Interaction.hpp>
#include<core/DisplayParameters.hpp>
#include<boost/algorithm/string.hpp>
#include<sstream>
#include<iomanip>
#include<boost/algorithm/string/case_conv.hpp>
#include<yade/lib/serialization/ObjectIO.hpp>
#include<yade/lib/pyutil/gil.hpp>
#include<lib/serialization/ObjectIO.hpp>
#include<lib/pyutil/gil.hpp>
#include<QtGui/qevent.h>
#ifdef YADE_GL2PS
......
......@@ -3,9 +3,9 @@
#pragma once
#ifndef Q_MOC_RUN
#include<yade/core/Omega.hpp>
#include<yade/pkg/common/OpenGLRenderer.hpp>
#include<yade/pkg/common/PeriodicEngines.hpp>
#include<core/Omega.hpp>
#include<pkg/common/OpenGLRenderer.hpp>
#include<pkg/common/PeriodicEngines.hpp>
#include<boost/date_time/posix_time/posix_time.hpp>
#endif
......
......@@ -11,17 +11,17 @@
#include"GLViewer.hpp"
#include"OpenGLManager.hpp"
#include<yade/lib/opengl/OpenGLWrapper.hpp>
#include<yade/core/Body.hpp>
#include<yade/core/Scene.hpp>
#include<yade/core/Interaction.hpp>
#include<yade/core/DisplayParameters.hpp>
#include<lib/opengl/OpenGLWrapper.hpp>
#include<core/Body.hpp>
#include<core/Scene.hpp>
#include<core/Interaction.hpp>
#include<core/DisplayParameters.hpp>
#include<boost/algorithm/string.hpp>
#include<sstream>
#include<iomanip>
#include<boost/algorithm/string/case_conv.hpp>
#include<yade/lib/serialization/ObjectIO.hpp>