Skip to content

Commit

Permalink
Merge branch 'release/v4.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
drbenmorgan committed Jul 15, 2019
2 parents ec91e92 + d286b79 commit 9107665
Show file tree
Hide file tree
Showing 1,047 changed files with 17,096 additions and 81,148 deletions.
14 changes: 10 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,29 @@ language: cpp
# - Linux: Singular VM with docker, one build for
# each different image
# - macOS: One each per osx_image value.
# Only latest Sierra w/clang for now.
# Only latest w/clang for now.
matrix:
include:
- os: linux
services: docker
env:
- DOCKER_IMAGE=supernemo/falaise-ubuntu1604-base:latest
- DOCKER_IMAGE=supernemo/falaise-ubuntu1604-base:develop
- DOCKER_CONTAINER=falaise-docker
- SCRIPT_PREFIX_CMD="docker exec $DOCKER_CONTAINER"
- os: linux
services: docker
env:
- DOCKER_IMAGE=supernemo/falaise-centos6-base:latest
- DOCKER_IMAGE=supernemo/falaise-ubuntu1804-base:develop
- DOCKER_CONTAINER=falaise-docker
- SCRIPT_PREFIX_CMD="docker exec $DOCKER_CONTAINER"
- os: linux
services: docker
env:
- DOCKER_IMAGE=supernemo/falaise-centos7-base:develop
- DOCKER_CONTAINER=falaise-docker
- SCRIPT_PREFIX_CMD="docker exec $DOCKER_CONTAINER"
- os: osx
osx_image: xcode8.3
osx_image: xcode10.1
compiler: clang
# Mac doesn't work just yet due to missing bottles but want to confirm things run.
allow_failures:
Expand Down
13 changes: 12 additions & 1 deletion .travis/ciscript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,27 @@
# - Stop on first command that fails
set -ex

# Bayeux *cannot* run without the USER env var..
# It may not be set in the image, so....
export USER=`whoami`

# Find ourselves
SELFDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PROJECTDIR="$(dirname "${SELFDIR}")"

# On Linux, check for brew'd GCC
if [ `uname` == "Linux" ] ; then
export CC=gcc-7
export CXX=g++-7
export FC=gfortran-7
fi

# Create build directory, deleting if present
rm -Rf build && mkdir build
cd build

# Configure, assuming presence of Ninja tool
cmake -DCMAKE_PREFIX_PATH="$(brew --prefix);$(brew --prefix qt5-base)" -DFALAISE_ENABLE_TESTING=ON -DFALAISE_WITH_COMPANIONS=ON -GNinja $PROJECTDIR
cmake -DCMAKE_PREFIX_PATH="$(brew --prefix);$(brew --prefix qt5-base)" -DFALAISE_ENABLE_TESTING=ON -GNinja $PROJECTDIR
# Build using Ninja to auto-parallelize
ninja
# Run tests - rerunning any that fail in verbose mode
Expand Down
29 changes: 10 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ endif()
# CMake/project requirements and configuration
#
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
project(Falaise VERSION "3.3.0")
project(Falaise VERSION "4.0.0")

# - Load custom modules
list(INSERT CMAKE_MODULE_PATH 0 ${PROJECT_SOURCE_DIR}/cmake)
Expand Down Expand Up @@ -75,12 +75,6 @@ if(FALAISE_ENABLE_TESTING)
enable_testing()
endif()

#-----------------------------------------------------------------------
# Configure/Build utilities as needed
#
option(FALAISE_WITH_DEVELOPER_TOOLS "Build/install developer tools" ON)
mark_as_advanced(FALAISE_WITH_DEVELOPER_TOOLS)

#-----------------------------------------------------------------------
# Optional build of documentation
#
Expand All @@ -94,21 +88,27 @@ option(FALAISE_WITH_DOCS "Build documentation for Falaise" ON)
# - GSL
# - ROOT
# - Geant4
set(FALAISE_BAYEUX_MIN_VERSION 3.1.2)
message( STATUS "Searching Bayeux ${FALAISE_BAYEUX_MIN_VERSION} ...")
set(FALAISE_BAYEUX_MIN_VERSION 3.4.1)
find_package(Bayeux ${FALAISE_BAYEUX_MIN_VERSION} REQUIRED geant4)

#-----------------------------------------------------------------------
# Build the subdirectories as required
#
add_subdirectory(utilities)
add_subdirectory(source)
add_subdirectory(resources)

if(FALAISE_WITH_DOCS)
add_subdirectory(documentation)
endif()

#-----------------------------------------------------------------------
# Copy/Install resources
#
file(COPY resources/ DESTINATION "${PROJECT_BUILD_DATAROOTDIR}/${PROJECT_RESOURCE_DIR}")
install(DIRECTORY resources/
DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_RESOURCE_DIR}"
)

#-----------------------------------------------------------------------
# - CMake Support files
include(CMakePackageConfigHelpers)
Expand Down Expand Up @@ -157,15 +157,6 @@ install(
# Falaise, so require the config/targets file to have been generated
add_subdirectory(modules)

#-----------------------------------------------------------------------
# Configure/Build companions as needed
#
option(FALAISE_WITH_COMPANIONS "Build/install companions tools" OFF)
mark_as_advanced(FALAISE_WITH_COMPANIONS)
if (FALAISE_WITH_COMPANIONS)
add_subdirectory(companions)
endif()

#-----------------------------------------------------------------------
# - Install published resources and documentation
install(DIRECTORY ${PROJECT_BUILD_DATAROOTDIR}/
Expand Down
116 changes: 55 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,46 +20,34 @@ with each module (or set of modules) having its own directory.
Additional modules from external sources and individual contribution
can be used too.

# Installing Falaise
# Getting Falaise
## Quickstart
If you simply wish to use or try out Falaise, we recommend installing it
using [our Home/Linuxbrew tap](https://github.com/SuperNEMO-dbd/homebrew-cadfael).
This will install everything you need, and includes the latest official
release of the software.

Once installed, consult the [online documentation](https://supernemo-dbd.github.io/Falaise)
for a full guide to running the software and writing new plugin modules.
We recommend installing Falaise and its requirements as documented on our [fork of Homebrew](https://github.com/SuperNEMO-DBD/brew).
Build-from-source and [Docker](https://www.docker.com)/[Singularity](https://www.sylabs.io/singularity/)
Image installs are available, both providing a complete suite of software and tools for using and developing Falaise and extension modules.

We strongly recommend Docker/Singularity Images on systems which support these tools,
especially on institution systems/clusters such as CC-IN2P3, as these provide the most
reliable and reproducible environments. For both systems, we strongly recommend that you
run and develop Falaise from within the `snemo-shell` environment provided, which is started and exited by running:

```console
$ brew snemo-shell
Homebrew >=1.7.1 (shallow or no git repository)
Supernemo-dbd/homebrew-core (git revision 15b2f; last commit 2019-02-27)
Type "brew ls --versions" to list available software
Type "exit" to deactivate the session
snemo-shell> flsimulate --version
...
snemo-shell> exit
$
```

If you have [Docker](https://www.docker.com) available, then images for current and past releases
together with instructions for use are available from [Docker Hub](https://hub.docker.com/r/supernemo/falaise/).
Once installed and setup, consult the [online documentation](https://supernemo-dbd.github.io/Falaise)
for a full guide to running `flsimulate`, `flreconstruct`, and writing new plugin modules.


## Building, Testing and Installing from Source
To build Falaise on your machine, the following requirements must be met:

- Linux or macOS System
- Supported Linux systems: CentOS6/7, Ubuntu 14.04/16.04LTS
- Other Linux distributions are known to work, but are not
officially supported. However, patches are welcome to resolve encountered issues!
- Suported macOS systems: 10.10/11/12 (Mavericks/El Capitan/Sierra)
- macOS High Sierra is not yet officially supported, but work is in progress
- GCC (>= 4.9), Clang (>=3.5) or Xcode 7/8
- [CMake](https://cmake.org) 3.5 or higher
- [Doxygen](http://www.doxygen.org) 1.8 or higher
- [Bayeux](https://github.com/SuperNEMO-DBD/Bayeux) 3.1.2 or higher
- [Boost](https:/boost.org) 1.63.0 or higher
- Must provide `program_options`, `thread`, `serialization`, `filesystem` and `system` components
- [Camp](https://github.com/tegesoft/camp) 0.7.1 or higher
- [GSL](http://www.gnu.org/s/gsl) 1.16 or higher
- [CLHEP](http://proj-clhep.web.cern.ch) 2.1.3.1 or higher
- [Geant4](http://geant4.cern.ch) 9.6.4 or higher
- with GDML support enabled
- [ROOT](http://root.cern.ch) 6.10 or higher

Falaise requires use of the C++11 or higher standard, so all of the above packages
and their C++ dependencies must be built/installed using this standard. This is
to ensure binary compatibility.

To get the source code, either download a release tarball or to get the latest development,
do

Expand All @@ -82,34 +70,10 @@ If you wish to enable `make test` after building, add the following option to cm
$ cmake -DFALAISE_ENABLE_TESTING=ON
```

Note: At this stage, if the following error is encountered;

```
CMake Error at /home/<user>/CadfaelBrew/lib64/cmake/Bayeux-3.1.2/BayeuxConfig.cmake:130 (find_package):
By not providing "FindQt5Core.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5Core", but
CMake did not find one.
Could not find a package configuration file provided by "Qt5Core"
(requested version 5.8.0) with any of the following names:
Qt5CoreConfig.cmake
qt5core-config.cmake
..
```

add the following options to the cmake command.

```
$ cmake -DCMAKE_PREFIX_PATH="$(brew --prefix);$(brew --prefix qt5-base)" <other options follow>
```

More info regarding Qt5Core and Falaise can be found at this address: (https://github.com/Homebrew/homebrew-core/issues/8392)

Errors at this stage are likely to be due to missing/unfound packages. If this is the
case, `cmake` can be directed to look in specific places using the `CMAKE_PREFIX_PATH`
variable. For example, if `Boost` is installed in `$HOME/boost` and `GSL` in `$HOME/software/gsl`,
variable (If you are running in an `snemo-shell` session, this is preset for you).
For example, if `Boost` is installed in `$HOME/boost` and `GSL` in `$HOME/software/gsl`,
`cmake` would be run as:

```
Expand Down Expand Up @@ -169,6 +133,36 @@ to install everything in a standard POSIX style hierarchy under the directory
passed as ``CMAKE_INSTALL_PREFIX``.


## Full Prerequisites
To build and run Falaise on your machine, the following OS and Software must be
present:

- Linux or macOS System
- Supported Linux systems: CentOS7, Ubuntu 16.04/18.04LTS
- Other Linux distributions are known to work, but are not
officially supported. However, patches are welcome to resolve encountered issues!
- Suported macOS systems: 10.12/13/14 (Sierra/High Sierra/Mojave)
- GCC (>= 7), Clang (>=6) or Xcode >= 9
- [CMake](https://cmake.org) 3.12 or higher
- [Doxygen](http://www.doxygen.org) 1.8 or higher
- [Bayeux](https://github.com/SuperNEMO-DBD/Bayeux) 3.3.1 or higher
- [Boost](https:/boost.org) 1.63.0/1.69.0 only
- Must provide `program_options`, `thread`, `serialization`, `filesystem` and `system` components
- [Camp](https://github.com/tegesoft/camp) 0.7.1 or higher
- [GSL](http://www.gnu.org/s/gsl) 2 or higher
- [CLHEP](http://proj-clhep.web.cern.ch) 2.1.3.1 only
- [Geant4](http://geant4.cern.ch) 9.6.4 only
- with GDML support enabled
- [ROOT](http://root.cern.ch) 6.10 or higher

Falaise requires use of the C++11 or higher standard, so all of the above packages
and their C++ dependencies must be built/installed using this standard. This is
to ensure binary compatibility.

The [SuperNEMO brew system](https://github.com/SuperNEMO-DBD/brew) can install the
above, either as build-from-source or as Docker/Singularity Images.


# Getting Help

If you have problems, questions, ideas or suggestions on Falaise or
Expand Down
1 change: 0 additions & 1 deletion cmake/FalaiseConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ set(Falaise_VERSION_REVISION "@Falaise_VERSION_REVISION@")
set(Falaise_CMAKE_CONFIG_DIR "${CMAKE_CURRENT_LIST_DIR}")

# Component Availability
set(Falaise_developer_tools_FOUND "@FALAISE_WITH_DEVELOPER_TOOLS@")
set(Falaise_companions_FOUND "@FALAISE_WITH_COMPANIONS@")
set(Falaise_docs_FOUND "@FALAISE_WITH_DOCS@")

Expand Down
54 changes: 47 additions & 7 deletions cmake/LPCCMakeSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
# - ``<PROJECT_NAME_UC>_CXX_STANDARD`` : (default : 11)
#
# - Compile projects against this C++ Standard. Allowed values are
# ``11`` (default) and ``14``.
# ``11`` (default), ``14``, ``17`` (CMake > 3.7) , and ``20`` (CMake > 3.11).
#

#-----------------------------------------------------------------------
Expand Down Expand Up @@ -345,8 +345,16 @@ endif()
set(CMAKE_CXX_EXTENSIONS OFF)

# - Allow choice of standard
set(BX_CXXSTD_VALUES "11" "14")
if(CMAKE_VERSION VERSION_GREATER 3.7)
list(APPEND BX_CXXSTD_VALUES "17")
endif()
if(CMAKE_VERSION VERSION_GREATER 3.11)
list(APPEND BX_CXXSTD_VALUES "20")
endif()

enum_option(${PROJECT_NAME_UC}_CXX_STANDARD
VALUES "11" "14"
VALUES ${BX_CXXSTD_VALUES}
TYPE STRING
DOC "Choose C++ Standard to compile against"
)
Expand Down Expand Up @@ -404,17 +412,19 @@ set(${PROJECT_NAME_UC}_CXX11_COMPILE_FEATURES
cxx_variadic_templates
)

# - For C++14, add all features supported by current compiler
# - For C++14,17,20 add all features supported by current compiler
set(${PROJECT_NAME_UC}_CXX14_COMPILE_FEATURES "${CMAKE_CXX14_COMPILE_FEATURES}")
set(${PROJECT_NAME_UC}_CXX17_COMPILE_FEATURES "${CMAKE_CXX17_COMPILE_FEATURES}")
set(${PROJECT_NAME_UC}_CXX20_COMPILE_FEATURES "${CMAKE_CXX20_COMPILE_FEATURES}")

# - Process compile features based on selected standard
if(${PROJECT_NAME_UC}_CXX_STANDARD EQUAL 11)
list(APPEND ${PROJECT_NAME_UC}_CXX_COMPILE_FEATURES ${${PROJECT_NAME_UC}_CXX11_COMPILE_FEATURES})
endif()

# - If C++14 is requested, add all features supported by current
# compiler. If no 14 features are supported, fail under assumption
# compiler does not support it.
# - If C++14/17/20 is requested, add all features supported by current
# compiler. If no 14/17/20 features are supported, fail under assumption
# compiler/cmake does not support it.
if(${PROJECT_NAME_UC}_CXX_STANDARD EQUAL 14)
if(NOT ${PROJECT_NAME_UC}_CXX14_COMPILE_FEATURES)
message(FATAL_ERROR "C++14 requested, but no support for any C++14 features for compiler:\n"
Expand All @@ -424,6 +434,36 @@ if(${PROJECT_NAME_UC}_CXX_STANDARD EQUAL 14)

list(APPEND ${PROJECT_NAME_UC}_CXX_COMPILE_FEATURES
${${PROJECT_NAME_UC}_CXX11_COMPILE_FEATURES}
${${PROJECT_NAME_UC}_PROJECT_CXX14_COMPILE_FEATURES}
${${PROJECT_NAME_UC}_CXX14_COMPILE_FEATURES}
)
endif()

if(${PROJECT_NAME_UC}_CXX_STANDARD EQUAL 17)
if(NOT ${PROJECT_NAME_UC}_CXX17_COMPILE_FEATURES)
message(FATAL_ERROR "C++17 requested, but no support for any C++17 features for compiler:\n"
"'${CMAKE_CXX_COMPILER_ID}', '${CMAKE_CXX_COMPILER_VERSION}'"
)
endif()

list(APPEND ${PROJECT_NAME_UC}_CXX_COMPILE_FEATURES
${${PROJECT_NAME_UC}_CXX11_COMPILE_FEATURES}
${${PROJECT_NAME_UC}_CXX14_COMPILE_FEATURES}
${${PROJECT_NAME_UC}_CXX17_COMPILE_FEATURES}
)
endif()

if(${PROJECT_NAME_UC}_CXX_STANDARD EQUAL 20)
if(NOT ${PROJECT_NAME_UC}_CXX20_COMPILE_FEATURES)
message(FATAL_ERROR "C++20 requested, but no support for any C++20 features for compiler:\n"
"'${CMAKE_CXX_COMPILER_ID}', '${CMAKE_CXX_COMPILER_VERSION}'"
)
endif()

list(APPEND ${PROJECT_NAME_UC}_CXX_COMPILE_FEATURES
${${PROJECT_NAME_UC}_CXX11_COMPILE_FEATURES}
${${PROJECT_NAME_UC}_CXX14_COMPILE_FEATURES}
${${PROJECT_NAME_UC}_CXX17_COMPILE_FEATURES}
${${PROJECT_NAME_UC}_CXX20_COMPILE_FEATURES}
)
endif()

9 changes: 0 additions & 9 deletions companions/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 9107665

Please sign in to comment.