Skip to content

Commit

Permalink
Merge branch 'release-1.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Bondoki authored and bondoki committed Apr 29, 2016
2 parents 4dce1f4 + c7d16d9 commit 1d85533
Show file tree
Hide file tree
Showing 17 changed files with 393 additions and 163 deletions.
38 changes: 34 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,46 @@ SET (APPLICATION_CODENAME "${PROJECT_NAME}")
SET (APPLICATION_COPYRIGHT_YEARS "2015")
SET (APPLICATION_VERSION_MAJOR 1)
SET (APPLICATION_VERSION_MINOR 1)
SET (APPLICATION_VERSION_PATCH 1)
SET (APPLICATION_VERSION_PATCH 2)
SET (APPLICATION_VERSION_TYPE SNAPSHOT)
SET (APPLICATION_VERSION_STRING "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}-${APPLICATION_VERSION_TYPE}")
SET (APPLICATION_ID "${APPLICATION_VENDOR_ID}.${PROJECT_NAME}")


#
# Debugging Options
#
SET (CMAKE_VERBOSE_MAKEFILE 0) # Use 1 for debugging, 0 for release
# Compile options
#

#define possible flags
SET (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -msse2 -mssse3 -fexpensive-optimizations ")
SET (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -msse2 -mssse3 -fexpensive-optimizations ")

SET (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -Wall -DDEBUG ")
SET (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -Wall -DDEBUG ")

#define value of CMAKE_BUILD_TYPE depending on input
IF(NOT CMAKE_BUILD_TYPE)
SET (CMAKE_BUILD_TYPE "Release") #default build type is Release
ELSEIF(CMAKE_BUILD_TYPE STREQUAL "Release")
SET (CMAKE_BUILD_TYPE "Release")
ELSEIF(CMAKE_BUILD_TYPE STREQUAL "Debug")
SET (CMAKE_BUILD_TYPE "Debug")
ELSE(NOT CMAKE_BUILD_TYPE)
MESSAGE(FATAL_ERROR "Invalid build type ${CMAKE_BUILD_TYPE} specified.")
ENDIF(NOT CMAKE_BUILD_TYPE)

#output depending on build type
IF(CMAKE_BUILD_TYPE STREQUAL "Release")
SET (CMAKE_VERBOSE_MAKEFILE 0)
MESSAGE("Build type is ${CMAKE_BUILD_TYPE}")
MESSAGE("USING CXX COMPILER FLAGS ${CMAKE_CXX_FLAGS_RELEASE}")
MESSAGE("USING C COMPILER FLAGS ${CMAKE_C_FLAGS_RELEASE}")
ELSEIF(CMAKE_BUILD_TYPE STREQUAL "Debug")
SET (CMAKE_VERBOSE_MAKEFILE 1)
MESSAGE("Build type is ${CMAKE_BUILD_TYPE}")
MESSAGE("USING CXX COMPILER FLAGS ${CMAKE_CXX_FLAGS_DEBUG}")
MESSAGE("USING C COMPILER FLAGS ${CMAKE_C_FLAGS_DEBUG}")
ENDIF(CMAKE_BUILD_TYPE STREQUAL "Release")

#
# Project Output Paths
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,15 @@ template metaprogramming in C++.
# installs the library and headers
sudo make install #only if you want to install the software after build
````
* If you also want to compile and run the tests, there is a third option, which can be
* If you also want to compile and run the tests, there is another option, which can be
passed to either the configure script (first build method), or to cmake (second build method)
This option is -DLEMONADE_TESTS=ON . You need internet access, because the process will
download the googletest library

* Another option that can be passed is -DCMAKE_BUILD_TYPE=Release/Debug. The default value
is Release, which uses compiler flags for optimization. If the option "Debug" is chosen,
no compiler optimizations are used, compiler warnings are enabled by -Wall, and
debugging information is compiled into the binary with -g. Other flags then "Release",
or "Debug" are not allowed and will lead to termination and an error message by cmake.

## Getting Started

Expand Down
22 changes: 16 additions & 6 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,19 @@ function usage
echo "-DINSTALLDIR_LEMONADE=/path/to/install/LeMonADE/"
echo "-DBUILDDIR=/path/to/build/LeMonADE/"
echo "-DLEMONADE_TESTS=ON/OFF"
echo "-DCMAKE_BUILD_TYPE=Release/Debug"
echo "default build directory is ./build"
echo "default install directory is /usr/local"
echo "default option for tests is OFF"
echo "default option for build type is Release"
}

#default values for build directory and install prefix
PWD_PATH=$(pwd)
BUILDDIR="build"
INSTALLDIR_OPTION="-DINSTALLDIR_LEMONADE=/usr/local"
TEST_ARGUMENT="-DLEMONADE_TESTS=OFF"
#INSTALLDIR_OPTION="-DINSTALLDIR_LEMONADE=/usr/local"
#TEST_ARGUMENT="-DLEMONADE_TESTS=OFF"
CMAKE_ARGUMENTS=""

#parse command line arguments
for arg in "$@"; do
Expand All @@ -27,7 +30,7 @@ for arg in "$@"; do
;;

-DINSTALLDIR_LEMONADE=*)
INSTALLDIR_ARGUMENT=${arg}
CMAKE_ARGUMENTS+=${arg}" "
INSTALLDIR=${arg#*=}
echo "Install directory set to "$INSTALLDIR
;;
Expand All @@ -38,10 +41,16 @@ for arg in "$@"; do
;;

-DLEMONADE_TESTS=*)
TEST_ARGUMENT=${arg}
CMAKE_ARGUMENTS+=${arg}" "
TESTOPTION=${arg#*=}
echo "Compiling tests set to "$TESTOPTION
;;

-DCMAKE_BUILD_TYPE=*)
CMAKE_ARGUMENTS+=${arg}" "
BUILDOPTION=${arg#*=}
echo "Build type set to "$BUILDOPTION
;;

* )
echo "unknown parameter"
Expand All @@ -58,8 +67,9 @@ if [ ! -d $BUILDDIR ]; then
mkdir -p $BUILDDIR
fi

echo "Arguments passed to cmake are "${CMAKE_ARGUMENTS}

(cd $BUILDDIR >/dev/null 2>&1 && cmake $INSTALLDIR_ARGUMENT $TEST_ARGUMENT $PWD_PATH)
(cd $BUILDDIR >/dev/null 2>&1 && cmake $CMAKE_ARGUMENTS $PWD_PATH)

########### set up the wrapper makefile ##################

Expand All @@ -77,7 +87,7 @@ all: ./${BUILDDIR}/Makefile
.PHONY: all
./${BUILDDIR}/Makefile:
@ (cd ${BUILDDIR} >/dev/null 2>&1 && cmake ${INSTALLDIR_ARGUMENT} ${PWD_PATH})
@ (cd ${BUILDDIR} >/dev/null 2>&1 && cmake ${CMAKE_ARGUMENTS} ${PWD_PATH})
clean:
@- \$(MAKE) --silent -C ${BUILDDIR} clean || true
Expand Down
65 changes: 0 additions & 65 deletions include/LeMonADE/LeMonADE.h

This file was deleted.

4 changes: 2 additions & 2 deletions include/LeMonADE/analyzer/AnalyzerRadiusOfGyration.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ along with LeMonADE. If not, see <http://www.gnu.org/licenses/>.

#include <string>

#include <LeMonADE/LeMonADE.h>
#include <LeMonADE/utility/Vector3D.h>
#include <LeMonADE/analyzer/AbstractAnalyzer.h>
#include <LeMonADE/utility/NumericTools.h>
#include <LeMonADE/utility/NumericFunctions.h>
#include <LeMonADE/utility/ResultFormattingTools.h>
#include <LeMonADE/utility/Vector3D.h>
#include <LeMonADE/utility/MonomerGroup.h>


/************************************************************************
Expand Down
31 changes: 31 additions & 0 deletions include/LeMonADE/core/Ingredients.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,37 @@ template <class Config> class Ingredients: public Config::context_type
return molecules;
}

/**
* @brief Synchronizes the Features and establishing consistency in the system.
*
* @details This function only calls the function
* context_type::synchronize(Ingredients&) with itsself as argument. Thus
* it causes all features to subsequently call their synchonize routines.
* Calling this function on an instance ( "ingredients.synchronize();" )
* is equivalent to calling "ingredients.synchonize(ingredients));"
*/
void synchronize()
{
context_type::synchronize(*this);
}

/**
* @brief Synchronizes the Features and establishing consistency in the system.
*
* @details This function only calls the function
* context_type::synchronize(Ingredients& ing). Thus it causes all features
* to subsequently call their synchonize routines with the same argument.
* This function allows to synchronize one instance of Ingredients with
* another instance.
*
* @param ingredients A reference to the Ingredients instance to synchronize with
*/
template<class IngredientsType>
void synchronize(IngredientsType& ing)
{
context_type::synchronize(ing);
}

/**
* @brief Export the relevant functionality of all meta-information and molecules
* for reading bfm-files.
Expand Down
Loading

0 comments on commit 1d85533

Please sign in to comment.