Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 26 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,39 @@ endif()
add_library(respond_model)
add_library(respond::respond_model ALIAS respond_model)

file(GLOB_RECURSE RESPOND_HEADERS include/respond/*.hpp include/respond/*.h)
file(GLOB RESPOND_INTERNAL_HEADERS CONFIGURE_DEPENDS src/internals/*.hpp)
file(GLOB RESPOND_SOURCE_FILES CONFIGURE_DEPENDS src/*.cpp)

target_sources(respond_model
PRIVATE
${RESPOND_INTERNAL_HEADERS}
${RESPOND_SOURCE_FILES}
src/internals/background.hpp
src/internals/behavior.hpp
src/internals/intervention.hpp
src/internals/logging_internals.hpp
src/internals/markov.hpp
src/internals/migration.hpp
src/internals/overdose.hpp
src/internals/transition_base.hpp
src/background.cpp
src/behavior.cpp
src/intervention.cpp
src/logging.cpp
src/migration.cpp
src/model_factory.cpp
src/overdose.cpp
src/transition_factory.cpp
PUBLIC
FILE_SET HEADERS
BASE_DIRS
include
FILES
${RESPOND_HEADERS}
include/respond/constants.hpp
include/respond/cost_effectiveness.hpp
include/respond/history.hpp
include/respond/logging.hpp
include/respond/model.hpp
include/respond/respond.hpp
include/respond/simulation.hpp
include/respond/timestep.hpp
include/respond/transition.hpp
include/respond/version.hpp
)

#-------------------------------------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ PROJECT_NAME = RESPOND
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 2.4.0
PROJECT_NUMBER = 2.5.0

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down Expand Up @@ -927,6 +927,7 @@ INPUT = docs/src/index.md \
docs/src/faq.md \
docs/src/architecture.md \
docs/src/api-guide.md \
docs/src/uml.md \
include

# This tag can be used to specify the character encoding of the source files
Expand Down
21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,14 @@ The [original RESPOND model](https://github.com/SyndemicsLab/RESPONDv1/tree/main

RESPOND makes full use of the CMake build system. It is a common tool used throughout the C++ user-base and we utilize it for dependency management, linking, and testing. As C++ has poor package management, we intentionally decided to move our focus away from tools such as conan and vcpkg and stay with pure CMake. Not to say we would never publish with such package managers, but it is not a core focus of the refactor/engineering team.

We natively support 5 different build workflows with the `CMakePresets.json` file. They are:

1. `test-debug-gcc-linux-shared-workflow`
2. `test-debug-gcc-linux-static-workflow`
3. `package-release-gcc-linux-shared-workflow`
4. `package-release-gcc-linux-static-workflow`
5. `benchmark-linux-static-workflow`

These workflows follow the pattern `{function}-{build}-gcc-linux-{library}-workflow` and have corresponding presets for build, test, and package. As we adopt more operating systems and compilers we will expand beyond gcc and linux.
The project provides configure/build/test/package presets in `CMakePresets.json`.
Common configure presets include `test-debug`, `test-release`, `test-debug-static`, `test-release-static`, `coverage`, `benchmark`, `package-shared`, `package-static`, and `docs`.

Overall, we make use of 10 CMake variables. They are found in the [options.cmake file](cmake/options.cmake) and all are set accordingly in the `CMakePresets.json`.

## Dependencies

We make abundant use of the CMake `FetchContent` feature released in CMake 3.11. We utilize features added in CMake 3.24 to check if the package is previously installed, so the minimum required version of CMake is **3.24**.
We make abundant use of the CMake `FetchContent` feature released in CMake 3.11, plus newer preset and dependency features. The minimum required version of CMake is **3.27**.

The required dependencies are:

Expand All @@ -54,7 +47,9 @@ If you would like to clone and build this locally, it is a relatively straightfo
```shell
git clone https://github.com/SyndemicsLab/respond.git
cd respond
cmake --workflow --preset test-debug-gcc-linux-shared-workflow
cmake --preset test-debug
cmake --build --preset test-debug
ctest --preset test-debug
```

And then the model is build and installed. Our default location is a build directory in the repository, but the CMake Install Directory can be pointed to wherever the user desires.
Expand Down Expand Up @@ -167,7 +162,9 @@ Open `build/static/docs/doxygen/html/index.html` in a browser.
After building with tests enabled:

```shell
cmake --workflow --preset test-debug-gcc-linux-static-workflow
cmake --preset test-debug-static
cmake --build --preset test-debug-static
ctest --preset test-debug-static
```

Tests verify all core components (models, transitions, history tracking).
Expand Down
Loading