diff --git a/CMakeLists.txt b/CMakeLists.txt index eed9944d..1d55defa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -142,10 +142,12 @@ if (ENABLE_TESTS) enable_testing() add_custom_target(build-tests) - add_custom_target(tests - COMMAND ${CMAKE_CTEST_COMMAND} - EXCLUDE_FROM_ALL) - add_dependencies(tests build-tests) + if (NOT TARGET tests) + add_custom_target(tests + COMMAND ${CMAKE_CTEST_COMMAND} + EXCLUDE_FROM_ALL) + add_dependencies(tests build-tests) + endif () add_subdirectory (tests EXCLUDE_FROM_ALL) diff --git a/ChangeLog.md b/ChangeLog.md index f51992b9..b8f4462a 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -10,8 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fix for OpenMP handling in `PFUNITCmake.cmake`. If you skip OpenMP, it is no longer a dependency - - Allow GFortran to use longer lines. (Impacts some upstream use cases.) - Updated external modules that contain bugfixes. + - Fixed cmake logic that fails on enabling tests if using submodules. + - Allow GFortran to use longer lines. (Impacts some upstream use cases.) ### Changed