Fix for recent instability in building
Added
- Improved ability to embed pFUnit in the source tree of other projects.
Changed
- pFUnit now uses CMake namespaces. Upstream projects should now link
againstPFUNIT::funit
(orPFUNIT::pfunit
) rather than justfunit
. Users that
build test suites using theadd_pfunit_ctest()
macro should not see an impact.
Fixed
-
The
add_pfunit_ctest()
macro could fail under several not-so-rare
circumstances. One way is for CMake to fail to build
OTHER_SOURCES
before the driver as it cannot correctly analyze
the indirect FortranUSE PFUNIT_EXTRA_INITIALIZE
statement. The
other is when using paralle builds with multiple test suites using
Intel and the-save-temps
flag. Here the compiler would overwrite the
driver.i90
in the build directory and produce confusing results.The solution is to use Cmake
configure_file()
to preprocess the driver
directly on a per-suite basis. This will allow CMake+FPP to corretly
analyze dependencies and avoid reuse ofdriver.i90
.