Skip to content

Commit

Permalink
Merge pull request #122 from njoy/party
Browse files Browse the repository at this point in the history
Updated to new build system.
  • Loading branch information
jlconlin authored Oct 30, 2020
2 parents a3d5815 + b06e6f7 commit d40447f
Show file tree
Hide file tree
Showing 56 changed files with 279 additions and 7,896 deletions.
24 changes: 0 additions & 24 deletions .gitmodules

This file was deleted.

509 changes: 77 additions & 432 deletions CMakeLists.txt

Large diffs are not rendered by default.

25 changes: 1 addition & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[![Build Status](http://jenkins.njoy21.io:8080/buildStatus/icon?job=NJOY21-Testing-Docker&build=63)](http://jenkins.njoy21.io:8080/view/NJOY21/job/NJOY21-Testing-Docker/63/)

# NJOY21 --- NJOY for the 21st Century
NJOY21 is the modernized version of NJOY---suitable for computing in the 21st Century. It is based on [NJOY2016](https://njoy.github.io/NJOY21).

Expand All @@ -24,7 +22,7 @@ NJOY21 is primarily written in modern C++. It consists of many subprojects that
Please refer to the [Release Notes](ReleaseNotes.md) to see what has changed from one version to the next.

## Installation
Instructions for building and installing NJOY21---as well as any of the subprojects---are found on our (admittedly inadequate) [website](https://njoy.github.io/Build/index.html).
Instructions for building and installing NJOY21---as well as any of the subprojects---are found on our [website](https://docs.github.io/install.html).

## Version
To see the version number for NJOY21, simply execute (after building):
Expand All @@ -37,27 +35,6 @@ NJOY21 roughly follows semantic versioning, where the version number is: `M.m.u`
2. The minor version is incremented whenever a new capability is added.
3. The update version is incremented whenever a new changed is added to the master (i.e., main or default) branch. This happens most often.

### Signature
NJOY21 has many dependencies that are updated independently of NJOY21. When NJOY21 is configured (using CMake), the latest production version of those dependencies is downloaded and used for compilation.

If you need to build an older version of NJOY21—including older versions of all dependencies—you can do using the "signature" of that version of NJOY21. To obtain the signature simply execute:
```bash
njoy21 --signature
```
The signature (a JSON object) will be printed to the screen, which can be then be saved to a file, e.g., `signature.json`. Alternatively, `signature.json` is automatically created whenever NJOY21 is configured. The file is saved in the build directory (typically `bin`) and copied to the install directory during the `make install` phase.

To configure with this signature file, do the following:
```bash
./metaconfigure/fetch_subprojects.py signature.json

# Configure
cmake -D fetched_subprojects=true </path/to/CMakeLists.txt>
make
make test
make install
```
These are similar instructions to when you need to build NJOY21 without access to the internet.

## Manual
The [NJOY2016 manual](https://github.com/njoy/NJOY2016-manual/blob/master/njoy16.pdf) ([download](https://github.com/njoy/NJOY2016-manual/raw/master/njoy16.pdf)) is the current manual for NJOY21.

Expand Down
5 changes: 5 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Release Notes&mdash;NJOY21
Given here are some release notes for NJOY21. Each release is made through a formal [Pull Request](https://github.com/njoy/NJOY21/pulls) made on GitHub. There are links in this document that point to each of those Pull Requests, where you can see in great details the changes that were made. Often the Pull Requests are made in response to an [issue](https://github.com/njoy/NJOY21/issues). In such cases, links to those issues are also given.

## [NJOY21 1.2.0](https://github.com/njoy/NJOY21/pull/122)
This update makes significant changes to the build system. Instead of using a [homegrown](https://github.com/njoy/metaconfigure) method for handling dependencies, we now use the [`FetchContent`](https://cmake.org/cmake/help/v3.16/module/FetchContent.html) capabilities in CMake. We now require CMake 3.16 to configure and build NJOY21.

As part of this update, we have changed the install instructions, which can now be found at [docs.njoy21.io](https://docs.njoy21.io/install.html).

## [NJOY21 1.1.1](https://github.com/njoy/NJOY21/pull/107)
This update fixes an issue where GCC would complain about a "maybe" uninitialized variable in [lipservice](https://github.com/njoy/lipservice). This only happens when compiled in release mode with GCC. Using the clang/LLVM compiler does not invoke this warning/error.

Expand Down
55 changes: 55 additions & 0 deletions cmake/develop_dependencies.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
cmake_minimum_required( VERSION 3.14 )
include( FetchContent )

#######################################################################
# Declare project dependencies
#######################################################################

FetchContent_Declare( ENDFtk
GIT_REPOSITORY https://github.com/njoy/ENDFtk
GIT_TAG origin/master
GIT_SHALLOW TRUE
)

FetchContent_Declare( dimwits
GIT_REPOSITORY https://github.com/njoy/DimensionalAnalysis
GIT_TAG origin/master
GIT_SHALLOW TRUE
)

FetchContent_Declare( lipservice
GIT_REPOSITORY https://github.com/njoy/lipservice
GIT_TAG origin/master
GIT_SHALLOW TRUE
)

FetchContent_Declare( njoy_c_bindings
GIT_REPOSITORY https://github.com/njoy/njoy_c_bindings
GIT_TAG origin/master
GIT_SHALLOW TRUE
)

FetchContent_Declare( tclap-adapter
GIT_REPOSITORY https://github.com/njoy/tclap-adapter
GIT_TAG origin/master
GIT_SHALLOW TRUE
)

FetchContent_Declare( utility
GIT_REPOSITORY https://github.com/njoy/utility
GIT_TAG origin/master
GIT_SHALLOW TRUE
)

#######################################################################
# Load dependencies
#######################################################################

FetchContent_MakeAvailable(
ENDFtk
dimwits
lipservice
njoy_c_bindings
tclap-adapter
utility
)
105 changes: 105 additions & 0 deletions cmake/release_dependencies.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
cmake_minimum_required( VERSION 3.14 )
include( FetchContent )

#######################################################################
# Declare project dependencies
#######################################################################

FetchContent_Declare( catch-adapter
GIT_REPOSITORY https://github.com/njoy/catch-adapter
GIT_TAG fb84b82ebf7a4789aa43cea560680cf745c6ee4f
)

FetchContent_Declare( dimwits
GIT_REPOSITORY https://github.com/njoy/DimensionalAnalysis
GIT_TAG acd794d373c8740a788f5c9d58a6eb8ba4d9861a
)

FetchContent_Declare( disco
GIT_REPOSITORY https://github.com/njoy/disco
GIT_TAG a1a7ddb2c0f69465524d8640ee29988b714a881e
)

FetchContent_Declare( ENDFtk
GIT_REPOSITORY https://github.com/njoy/ENDFtk
GIT_TAG b6618b396f51e802b7ee19ba529533c27e6ac302 # tag: v0.1.0
)

FetchContent_Declare( hana-adapter
GIT_REPOSITORY https://github.com/njoy/hana-adapter
GIT_TAG f58e8973c9a614dc4f3720b5581a762c61bdbb40
)

FetchContent_Declare( header-utilities
GIT_REPOSITORY https://github.com/njoy/header-utilities
GIT_TAG cc2610fee15e255c151e8e22aca1e8b3d1a96b39
)

FetchContent_Declare( lipservice
GIT_REPOSITORY https://github.com/njoy/lipservice
GIT_TAG a9b4696883f8b363b28b5b31eecb585ca4429c94
)

FetchContent_Declare( Log
GIT_REPOSITORY https://github.com/njoy/Log
GIT_TAG 52962b7796afe37ef1d8f7edb4bf9ecb1b868d15
)

FetchContent_Declare( njoy
GIT_REPOSITORY http://github.com/njoy/NJOY2016
GIT_TAG b41e221c0752d5e03ed0a74d4cb6106023a59b99
)

FetchContent_Declare( njoy_c_bindings
GIT_REPOSITORY https://github.com/njoy/njoy_c_bindings
GIT_TAG 48f2de6d8573a1a4234de85bc01c902c07eeceb5
)

FetchContent_Declare( nlohmann_json
GIT_REPOSITORY https://github.com/nlohmann/json
GIT_TAG e7b3b40b5a95bc74b9a7f662830a27c49ffc01b4 # tag: v3.7.3
)
set(JSON_BuildTests OFF CACHE INTERNAL "")

FetchContent_Declare( range-v3-adapter
GIT_REPOSITORY https://github.com/njoy/range-v3-adapter
GIT_TAG 252679d4737c8f755d87c0e1eed6c37394a2ec59
)

FetchContent_Declare( spdlog
GIT_REPOSITORY https://github.com/gabime/spdlog
GIT_TAG a51b4856377a71f81b6d74b9af459305c4c644f8
)
set( SPDLOG_BUILD_TESTING CACHE BOOL OFF )

FetchContent_Declare( tclap-adapter
GIT_REPOSITORY https://github.com/njoy/tclap-adapter
GIT_TAG 2642a0f6913c431608c7cd2c61607cb2d775d5b9
)

FetchContent_Declare( utility
GIT_REPOSITORY https://github.com/njoy/utility
GIT_TAG 4e72b708d153450bdbc7fc2b45651d71f9a183dc
)

#######################################################################
# Load dependencies
#######################################################################

FetchContent_MakeAvailable(
catch-adapter
dimwits
disco
ENDFtk
hana-adapter
header-utilities
lipservice
Log
njoy
njoy_c_bindings
nlohmann_json
range-v3-adapter
spdlog
tclap-adapter
utility
)
16 changes: 16 additions & 0 deletions cmake/unit_testing.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#######################################################################
# Setup
#######################################################################

message( STATUS "Adding NJOY21 unit testing" )
enable_testing()


#######################################################################
# Unit testing directories
#######################################################################

add_subdirectory( src/njoy21/CommandLine/test )
add_subdirectory( src/njoy21/Driver/test )
add_subdirectory( src/njoy21/io/Manager/test )
add_subdirectory( src/njoy21/legacy/Sequence/test )
1 change: 0 additions & 1 deletion dependencies/ENDFtk
Submodule ENDFtk deleted from f42641
1 change: 0 additions & 1 deletion dependencies/dimwits
Submodule dimwits deleted from d2b187
1 change: 0 additions & 1 deletion dependencies/lipservice
Submodule lipservice deleted from 35d794
1 change: 0 additions & 1 deletion dependencies/njoy_c_bindings
Submodule njoy_c_bindings deleted from 487beb
1 change: 0 additions & 1 deletion dependencies/tclap-adapter
Submodule tclap-adapter deleted from 4b2c1f
1 change: 0 additions & 1 deletion dependencies/utility
Submodule utility deleted from 361c72
10 changes: 0 additions & 10 deletions metaconfigure/LICENSE

This file was deleted.

6 changes: 0 additions & 6 deletions metaconfigure/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions metaconfigure/__init__.py

This file was deleted.

Loading

0 comments on commit d40447f

Please sign in to comment.