Skip to content

Commit

Permalink
Merge pull request #412 from Goddard-Fortran-Ecosystem/hotfix/gnu-mak…
Browse files Browse the repository at this point in the history
…e-fixes

Fixes for GNU Make
  • Loading branch information
tclune authored Jan 23, 2023
2 parents d178941 + ce89a22 commit 1807e98
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
12 changes: 10 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -136,6 +136,10 @@ if (APPLE)
SET(CMAKE_Fortran_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
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)
Expand Down Expand Up @@ -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)
Expand All @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion extern/fArgParse
4 changes: 0 additions & 4 deletions src/funit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand Down

0 comments on commit 1807e98

Please sign in to comment.