Commit bbe74278 authored by Sebastian Müller's avatar Sebastian Müller 🐈
Browse files

version: discourage users from using version_date.txt

parent 30358cec
Pipeline #98883 passed with stages
in 5 minutes and 1 second
cmake_minimum_required(VERSION 3.14)
# get version and date from files (version.txt and version_date.txt)
# get version from file (version.txt) and date from latest git commit
include(cmake/cmake-modules/version.cmake)
get_version(PROJ_VER PROJ_VER_DEV PROJ_DATE)
......
......@@ -14,7 +14,7 @@ Template of a Fortran program depending on FORCES provided by
- `src/`: folder containing your fortran modules and pfUnit tests (`src/tests`)
- `mo_your_module.f90` - simple example module
- `mo_your_program_info.F90` - simple information including `version` and `version_date` generated by the pre-processor from the version files `version.txt` and `version_date.txt` (note that it ends with `.F90` so the compiler know it needs to be pre-processed)
- `mo_your_program_info.F90` - simple information including `version` and `version_date` generated by the pre-processor from the version file `version.txt` (note that it ends with `.F90` so the compiler know it needs to be pre-processed)
- `tests/test_your_module.pf` - simple pfUnit test for `mo_your_module.f90`
- `app/`: (optional) folder containing your fortran main program
- `main.f90` simple example program
......
......@@ -975,8 +975,7 @@ EXCLUDE_SYMBOLS =
# that contain example code fragments that are included (see the \include
# command).
EXAMPLE_PATH = version.txt \
version_date.txt
EXAMPLE_PATH = version.txt
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
......
#!/bin/bash
version="'"$(cat version.txt)"'"
version_date="'"$(cat version_date.txt)"'"
version_date="'"$(git log -1 --format=%cd --date=format:%Y-%m-%d)"'"
if [[ -n $FC && -n $(command -v $FC) ]]; then
if [[ $FC == *nagfor ]]; then
$FC -fpp -F -DPROJVERSION="${version}" -DPROJDATE="${version_date}" -o tempfile-doxygen.fpp $1 &>/dev/null
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment