diff --git a/CMakeLists.txt b/CMakeLists.txt index f06d94a1..0e723e40 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,7 @@ cmake_minimum_required(VERSION 3.12) project (PFUNIT - VERSION 4.7.0 + VERSION 4.7.3 LANGUAGES Fortran C) cmake_policy(SET CMP0077 NEW) diff --git a/ChangeLog.md b/ChangeLog.md index 89cc8257..c579be8f 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -6,9 +6,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Changed - - Updated CI to remove gcc-9 from macOS11 and add gcc-12 +## [4.7.3] - 2023-07-21 + +### Fixed +- Fixed cmake issue where target "pfunit-mpi-defines" is defined more than once +- Missing variable declaration in parameterized test case boiler plate code. + +## [4.7.2] - 2023-06-26 + +### Fixed +- Restored consistent behaviour for file paths between `add_pfunit_ctest` and `add_pfunit_sources`. + Now the `add_pfunit_ctest` handles relative filepaths (e.g. `./path/to/source.pf`) as described + in the script documentation. + +## [4.7.1] - 2023-06-26 + +### Fixed +- Increased size of buffer for reporting real values in asserts. Previous length was not quite enough for some 128 bit values, which resulted in EOR failures during execution. + + ## [4.7.0] - 2023-04-17 ### Changed diff --git a/bin/funit/pFUnitParser.py b/bin/funit/pFUnitParser.py index e0495ec1..44960863 100644 --- a/bin/funit/pFUnitParser.py +++ b/bin/funit/pFUnitParser.py @@ -768,7 +768,7 @@ def printRunMethod(self): def printParameterHeader(self, type): self.outputFile.write(' type (' + type + '), allocatable :: testParameters(:)\n') self.outputFile.write(' type (' + type + ') :: testParameter\n') - self.outputFile.write(' integer :: iParam \n') + self.outputFile.write(' integer :: iParam, iCase \n') self.outputFile.write(' integer, allocatable :: cases(:) \n') self.outputFile.write(' \n') diff --git a/include/add_pfunit_ctest.cmake b/include/add_pfunit_ctest.cmake index 25c44a39..d2da0ae1 100644 --- a/include/add_pfunit_ctest.cmake +++ b/include/add_pfunit_ctest.cmake @@ -51,17 +51,18 @@ function (add_pfunit_ctest test_package_name) set (test_sources_f90) set (test_suites_inc "") - foreach (pf_file ${PF_TEST_TEST_SOURCES}) + # Create contents of the test_suites files + foreach (pf_file ${PF_TEST_TEST_SOURCES}) get_filename_component (basename ${pf_file} NAME_WE) - set (f90_file "${basename}.F90") - list (APPEND test_sources_f90 ${f90_file}) set (test_suites_inc "${test_suites_inc}ADD_TEST_SUITE(${basename}_suite)\n") - add_pfunit_sources(test_sources_f90 ${PF_TEST_TEST_SOURCES}) endforeach() - + # Preprocess test files + # F90 files are set in test_sources_f90 + add_pfunit_sources(test_sources_f90 ${PF_TEST_TEST_SOURCES}) + if (PF_TEST_EXTRA_USE) set(PFUNIT_EXTRA_USE ${PF_TEST_EXTRA_USE}) endif() diff --git a/src/funit/asserts/Assert_Real.tmpl b/src/funit/asserts/Assert_Real.tmpl index 52f45c15..3f409e9f 100644 --- a/src/funit/asserts/Assert_Real.tmpl +++ b/src/funit/asserts/Assert_Real.tmpl @@ -187,7 +187,7 @@ module pf_AssertReal_{rank}d @overload(assert_relatively_equal, minimal) - integer, parameter :: MAX_LEN_REAL_AS_STRING = 40 + integer, parameter :: MAX_LEN_REAL_AS_STRING = 45 contains diff --git a/src/pfunit/CMakeLists.txt b/src/pfunit/CMakeLists.txt index caeeeea8..0dc1e5d0 100644 --- a/src/pfunit/CMakeLists.txt +++ b/src/pfunit/CMakeLists.txt @@ -40,5 +40,7 @@ foreach(pfunit_target IN LISTS pfunit_targets) target_link_libraries (${pfunit_target} PRIVATE pfunit-mpi-defines) install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod/ DESTINATION ${dest}/include) - install (TARGETS ${pfunit_target} pfunit-mpi-defines EXPORT PFUNIT DESTINATION ${dest}/lib) + install (TARGETS ${pfunit_target} EXPORT PFUNIT DESTINATION ${dest}/lib) endforeach() + +install (TARGETS pfunit-mpi-defines EXPORT PFUNIT DESTINATION ${dest}/lib)