diff --git a/CMakeLists.txt b/CMakeLists.txt index ef723fda..95f9c573 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,7 @@ cmake_minimum_required(VERSION 3.12) project (PFUNIT - VERSION 4.6.1 + VERSION 4.6.2 LANGUAGES Fortran C) # Determine if pFUnit is built as a subproject (using @@ -136,6 +136,10 @@ if (APPLE) SET(CMAKE_Fortran_ARCHIVE_FINISH " -no_warning_for_no_symbols -c ") endif () +include(build_submodule) +# Find fArgParse first so that gFTL and gFTL-shared are consistent +build_submodule(extern/fArgParse PROJECT FARGPARSE TARGET FARGPARSE::fargparse) + add_subdirectory (src) add_subdirectory (include) add_subdirectory (bin) @@ -166,6 +170,11 @@ if (ENABLE_TESTS) file(WRITE "${CMAKE_BINARY_DIR}/CTestCustom.cmake" "set(CTEST_CUSTOM_PRE_TEST ${CTEST_CUSTOM_PRE_TEST_QUOTED})" "\n") endif() +# The following is needed for external projects using *nix make when +# parent project builds pFUnit as a subproject. +set (top_dir PFUNIT-${PFUNIT_VERSION_MAJOR}.${PFUNIT_VERSION_MINOR}) +set (PFUNIT_TOP_DIR "${CMAKE_INSTALL_PREFIX}/${top_dir}" CACHE PATH "") + # Packaging include(CMakePackageConfigHelpers) include (cmake/packaging.cmake) @@ -185,7 +194,6 @@ configure_file(cmake/PFUNIT.mk.in "${PROJECT_BINARY_DIR}/PFUNIT.mk" @ONLY) # Install the pFUnitConfig.cmake and pFUnitConfigVersion.cmake -set (top_dir PFUNIT-${PFUNIT_VERSION_MAJOR}.${PFUNIT_VERSION_MINOR}) install(FILES "${PROJECT_BINARY_DIR}/PFUNITConfig.cmake" "${PROJECT_BINARY_DIR}/PFUNITConfig-version.cmake" diff --git a/ChangeLog.md b/ChangeLog.md index ef16d051..11aa7054 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -5,12 +5,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [4.6.2] - 2023-01-23 + ### Fixed - Fixed build_submodule for old git versions - Fixed for use with FetchContent - Fix CMake logic in `add_pfunit_ctest.cmake` for `MPIEXEC_EXECUTABLE`. Problem not exposed by common MPI flavors which use `mpirun` - Fix GitHub CI workflow by pinning to CMake 3.24.3 +- Fixes for GNU Make builds +- Update fArgParse submodule to v1.4.2 - Fix `pFUnitParser.py` in cases where there is no module name ## [4.6.1] - 2022-11-15 diff --git a/extern/fArgParse b/extern/fArgParse index 604b2208..f7176689 160000 --- a/extern/fArgParse +++ b/extern/fArgParse @@ -1 +1 @@ -Subproject commit 604b2208a90d8a042adb043a74de93e870f6f1cb +Subproject commit f71766897ca1fc5e119cd8bd315c8c72c6bea7d9 diff --git a/src/funit/CMakeLists.txt b/src/funit/CMakeLists.txt index 25ee8501..4f6b2b7e 100644 --- a/src/funit/CMakeLists.txt +++ b/src/funit/CMakeLists.txt @@ -22,10 +22,6 @@ function(funit_target_link_pfunit funit_target) target_link_libraries (${funit_target} PUBLIC OpenMP::OpenMP_Fortran) endif () - include(build_submodule) - # Find fArgParse first so that gFTL and gFTL-shared are consistent - build_submodule(${PROJECT_SOURCE_DIR}/extern/fArgParse PROJECT FARGPARSE TARGET FARGPARSE::fargparse) - if (NOT TARGET GFTL::gftl) message(FATAL_ERROR "Could not find gFTL. This should not happen.") endif ()