Skip to content

Commit

Permalink
Merge #3248 #3251
Browse files Browse the repository at this point in the history
3248: Fix cmake install on dev branch r=KaiSzuttor a=jngrad

Porting #3228 to the dev branch

Description of changes:
- fix the CMake build system to include libraries in the list of installed files and test it in a dedicated CI job
- fix the versioning of Cython .so shared objects
- simplify the CMake tests


3251: Particle data r=jngrad a=fweik

Fixes #3157.

Description of changes:
 - Split definition of `struct Particle` from rest of particle data.


Co-authored-by: Christoph Junghans <junghans@lanl.gov>
Co-authored-by: Jean-Noël Grad <jgrad@icp.uni-stuttgart.de>
Co-authored-by: Florian Weik <fweik@icp.uni-stuttgart.de>
  • Loading branch information
4 people committed Oct 15, 2019
3 parents 94d51f5 + 1eb21f3 + aedadef commit 34c6bd7
Show file tree
Hide file tree
Showing 95 changed files with 495 additions and 540 deletions.
31 changes: 31 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,37 @@ tutorials-samples-no-gpu:
only:
- schedules

installation:
<<: *global_job_definition
stage: build
image: gitlab.icp.uni-stuttgart.de:4567/espressomd/docker/ubuntu-python3:cuda-10.1
script:
- export myconfig=maxset with_coverage=false make_check=false
- export srcdir=${CI_PROJECT_DIR} test_timeout=1800
- bash maintainer/CI/build_cmake.sh
- cd build
# install ESPResSo (in CI, pypresso will run up to 5 times slower when
# located outside the build directory, hence the larger timeout value)
- make install
# get path of installed files
- CI_INSTALL_DIR="/tmp/espresso-unit-tests"
- CI_INSTALL_PYTHON_PATH=$(dirname $(find "${CI_INSTALL_DIR}/lib" -name espressomd))
# deploy object-in-fluid module
- cp -r "src/python/object_in_fluid" "${CI_INSTALL_PYTHON_PATH}/object_in_fluid"
# run all tests with the installed files
- sed -i "s|$(pwd)/pypresso|${CI_INSTALL_DIR}/bin/pypresso|" testsuite/{python,scripts/samples,scripts/tutorials}/CTestTestfile.cmake
# skip long tests
- sed -i "/tutorial_11-ferrofluid_3/d" testsuite/scripts/tutorials/CTestTestfile.cmake
- make -j2 check_python_skip_long
- make -j2 check_samples
- make -j2 check_tutorials
tags:
- docker
- linux
- cuda
timeout: 3h
when: manual

empty:
<<: *global_job_definition
stage: build
Expand Down
8 changes: 0 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,6 @@ endif()
enable_language(CXX)

set(PROJECT_VERSION "5.0-dev")
string(REGEX
REPLACE "^([1-9]+)\\.[0-9]+.*$"
"\\1"
SOVERSION
"${PROJECT_VERSION}")
if(NOT ${SOVERSION} MATCHES "^[1-9]+$")
message(FATAL_ERROR "Could not determine SOVERSION from ${PROJECT_VERSION}")
endif(NOT ${SOVERSION} MATCHES "^[1-9]+$")

#
# CMake internal vars
Expand Down
4 changes: 2 additions & 2 deletions doc/sphinx/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ author = 'C. Holm, F. Weik, R. Weeber'
# built documents.
#
# The short X.Y version.
version = '@PROJECT_VERSION@'
version = '.'.join('@PROJECT_VERSION@'.split('.')[:2])
# The full version, including alpha/beta/rc tags.
release = '@SOVERSION@'
release = '@PROJECT_VERSION@'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
11 changes: 7 additions & 4 deletions doc/sphinx/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ build directory and create a new one.
.. _make\: Compiling, testing and installing:
``make``: Compiling, testing and installing
--------------------------------------------
-------------------------------------------
The command ``make`` is mainly used to compile the source code, but it
can do a number of other things. The generic syntax of the ``make``
Expand All @@ -701,9 +701,12 @@ targets are available:
Deletes all files that were created during the compilation.
``install``
Install |es|.
Use ``make DESTDIR=/home/john install`` to install to a
specific directory.
Install |es| in the path specified by the CMake variable
``CMAKE_INSTALL_PREFIX``. The path can be changed by calling CMake
with ``cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/espresso``. Do not use
``make DESTDIR=/path/to/espresso install`` to install to a specific path,
this will cause issues with the runtime path (RPATH) and will conflict
with the CMake variable ``CMAKE_INSTALL_PREFIX`` if it has been set.
``doxygen``
Creates the Doxygen code documentation in the :file:`doc/doxygen`
Expand Down
1 change: 0 additions & 1 deletion src/config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ execute_process(COMMAND ${PYTHON_EXECUTABLE}
add_library(EspressoConfig SHARED config-features.cpp)
add_dependencies(EspressoConfig myconfig check_myconfig generate_config_features)
install(TARGETS EspressoConfig LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd)
set_target_properties(EspressoConfig PROPERTIES SOVERSION ${SOVERSION})
target_include_directories(EspressoConfig PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})

# Parse repository info from git if available
Expand Down
1 change: 0 additions & 1 deletion src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ else(CUDA)
endif(CUDA)

install(TARGETS EspressoCore LIBRARY DESTINATION ${PYTHON_INSTDIR}/espressomd)
set_target_properties(EspressoCore PROPERTIES SOVERSION ${SOVERSION})
target_include_directories(EspressoCore PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
if(WITH_COVERAGE)
target_compile_options(EspressoCore PUBLIC "$<$<CONFIG:Release>:-g>")
Expand Down
2 changes: 1 addition & 1 deletion src/core/EspressoSystemInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "EspressoSystemInterface.hpp"
#include "Particle.hpp"
#include "cells.hpp"
#include "cuda_interface.hpp"
#include "grid.hpp"
#include "particle_data.hpp"

/* Initialize instance pointer */
EspressoSystemInterface *EspressoSystemInterface::m_instance = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion src/core/PartCfg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
#ifndef CORE_PART_CFG_HPP
#define CORE_PART_CFG_HPP

#include "Particle.hpp"
#include "ParticleCache.hpp"
#include "cells.hpp"
#include "grid.hpp"
#include "particle_data.hpp"
#include "serialization/Particle.hpp"
#include <utils/SkipIterator.hpp>

Expand Down
Loading

0 comments on commit 34c6bd7

Please sign in to comment.