Skip to content
Open
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
14 changes: 11 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
set(ExampleName "cellml_split_reaction_diffusion_equation")
cmake_minimum_required(VERSION 3.26 FATAL_ERROR)

if(DEFINED OpenCMISS_INSTALL_ROOT)
if(EXISTS "${OpenCMISS_INSTALL_ROOT}/libOpenCMISSSetup.cmake")
set(CMAKE_PROJECT_INCLUDE_BEFORE "${OpenCMISS_INSTALL_ROOT}/libOpenCMISSSetup.cmake")
endif()
endif()

cmake_minimum_required(VERSION 3.4 FATAL_ERROR)
set(ExampleName "cellml_split_reaction_diffusion_equation")

project(${ExampleName} VERSION 1.0 LANGUAGES C Fortran)

find_package(OpenCMISSLibs 1.3.0 REQUIRED COMPONENTS Iron CONFIG)
find_package(libOpenCMISS 1.0.0 REQUIRED
COMPONENTS Fortran
)

add_subdirectory(src/fortran)
7 changes: 4 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ Building the example
The fortran version of the example can be configured and built with CMake::

git clone https://github.com/OpenCMISS-Examples/cellml_split_reaction_diffusion_equation
mkdir cellml_split_reaction_diffusion_equation-build
cd cellml_split_reaction_diffusion_equation-build
cmake -DOpenCMISSLibs_DIR=/path/to/opencmisslib/install ../cellml_split_reaction_diffusion_equation
cd cellml_split_reaction_diffusion_equation
mkdir build
cd build
cmake -DOpenCMISS_INSTALL_ROOT=/path/to/opencmiss/install ../.
make

This will create the example executable "cellml_split_reaction_diffusion_equation" in ./src/fortran/ directory.
Expand Down
2 changes: 1 addition & 1 deletion src/fortran/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
add_executable(${ExampleName} ${ExampleName}.F90)

target_link_libraries(${ExampleName} PRIVATE opencmisslibs)
target_link_libraries(${ExampleName} PRIVATE OpenCMISS::libOpenCMISS_Fortran)

install(TARGETS ${ExampleName} DESTINATION bin)

Expand Down
Loading