Skip to content

Commit

Permalink
Merge pull request #45 from Quetzal-framework/develop
Browse files Browse the repository at this point in the history
doc: trying mrdox support
  • Loading branch information
Becheler authored Sep 10, 2024
2 parents 2863cb8 + 651ec4b commit 7e11708
Show file tree
Hide file tree
Showing 9 changed files with 75 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ add_subdirectory(src)
# generate project documentation
add_subdirectory(docs)

# generate project documentation
add_subdirectory(mrdox)

# add template project
add_subdirectory(template)

Expand Down
4 changes: 2 additions & 2 deletions docs/4-tutorials.md
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ The general idea is to define lambda expressions that embed stochastic aspects o
---
[//]: # (----------------------------------------------------------------------)
@page spatial_graph_local_process Local autoregressive processes
@page spatial_graph_local_process Defining autoregressive processes on
@tableofcontents
## Background
Expand Down Expand Up @@ -1099,7 +1099,7 @@ Where:
---
[//]: # (----------------------------------------------------------------------)
@page dispersal_kernels Spatial Interactions
@page spatial_graph_dispersal_kernels Dispersal on a spatial graph
@tableofcontents
## Distance-Based Kernels
Expand Down
41 changes: 41 additions & 0 deletions mrdox/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# requires cxx_std_20 new in CMake 3.12
cmake_minimum_required(VERSION 3.12)

# Tell find_package() to first search using Config mode before falling back to Module mode (for conan)
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# Global approach Gdal
find_package(GDAL REQUIRED)

# range-v3
find_package(range-v3)

# mp-units
find_package(mp-units CONFIG REQUIRED)

# Include Boost as an imported target: 1.73 important for compilation with gcc 10 and C++20
find_package(Boost 1.79 REQUIRED COMPONENTS unit_test_framework filesystem serialization)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS}) # Find Boost headers only
ENDIF()

file(GLOB SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
foreach(testSrc ${SRCS})
# Extract the filename without an extension (NAME_WE)
get_filename_component(testName ${testSrc} NAME_WE)
# Add compile target
add_executable(${testName} ${testSrc})
# Require the standard
target_compile_features(${testName} PUBLIC cxx_std_23)
# Ignore warnings about subtle ABI change
target_compile_options(${testName} PUBLIC "-Wno-psabi")
# Link to Boost libraries AND other targets and dependencies
target_link_libraries(${testName} quetzal::quetzal boost::boost GDAL::GDAL range-v3::range-v3 mp-units::mp-units)
# Specifies include directories to use when compiling a given target
target_include_directories(
${testName} PRIVATE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>)
endforeach(testSrc)
5 changes: 5 additions & 0 deletions mrdox/coalescence.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "quetzal/coalescence.hpp"

int main(){
return 0;
}
4 changes: 4 additions & 0 deletions mrdox/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
concurrency: 1 # number of threads to use
source-root: ../ # source files relative to the mrdox.yml file
multipage: false # generate multiple pages
verbose: true # print verbose output
5 changes: 5 additions & 0 deletions mrdox/demography.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "quetzal/demography.hpp"

int main(){
return 0;
}
5 changes: 5 additions & 0 deletions mrdox/expressive.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "quetzal/expressive.hpp"

int main(){
return 0;
}
5 changes: 5 additions & 0 deletions mrdox/geography.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "quetzal/geography.hpp"

int main(){
return 0;
}
5 changes: 5 additions & 0 deletions mrdox/io.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "quetzal/io.hpp"

int main(){
return 0;
}

0 comments on commit 7e11708

Please sign in to comment.