diff --git a/CMakeLists.txt b/CMakeLists.txt index b1c4d44..a4392ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,11 @@ +# This file is part of Fortuno. +# Licensed under the BSD-2-Clause Plus Patent license. +# SPDX-License-Identifier: BSD-2-Clause-Patent + +# The CMake config files were created based on the public template at +# https://github.com/LecrisUT/CMake-Template + + #[=================================================================================================[ # Basic project definition # ]=================================================================================================] @@ -41,7 +49,7 @@ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) include(FortunoHelpers) if (FORTUNO_INSTALL) - include(CMakePackageConfigHelpers) + include(CMakePackageConfigHelpers) include(GNUInstallDirs) endif () @@ -51,10 +59,10 @@ set(BUILD_SHARED_LIBS ${FORTUNO_BUILD_SHARED_LIBS}) # Report configuration feature_summary( FILENAME ${CMAKE_CURRENT_BINARY_DIR}/Fortuno.info - VAR Fortuno_Info - DESCRIPTION "Fortuno features and external libraries" - FATAL_ON_MISSING_REQUIRED_PACKAGES - WHAT ALL + VAR Fortuno_Info + DESCRIPTION "Fortuno features and external libraries" + FATAL_ON_MISSING_REQUIRED_PACKAGES + WHAT ALL ) message(STATUS ${Fortuno_Info}) @@ -86,16 +94,16 @@ endif () if (FORTUNO_INSTALL) - # pkg-config files - configure_file(cmake/fortuno.pc.in fortuno.pc @ONLY) - install( + # pkg-config files + configure_file(cmake/fortuno.pc.in fortuno.pc @ONLY) + install( FILES ${CMAKE_CURRENT_BINARY_DIR}/fortuno.pc - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig - COMPONENT Fortuno_development + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig + COMPONENT Fortuno_development ) # cmake export files - write_basic_package_version_file( + write_basic_package_version_file( ${CMAKE_CURRENT_BINARY_DIR}/FortunoConfigVersion.cmake VERSION ${PROJECT_VERSION} # COMPATIBILITY SameMajorVersion @@ -131,21 +139,21 @@ endif () # Make project available for FetchContent if (NOT PROJECT_IS_TOP_LEVEL) # Propagate variables - if (CMAKE_VERSION VERSION_LESS 3.25) - # TODO: Remove when required minimum cmake version is >= 3.25 - set(Fortuno_VERSION ${Fortuno_VERSION} PARENT_SCOPE) - set(Fortuno_VERSION_MAJOR ${Fortuno_VERSION_MAJOR} PARENT_SCOPE) - set(Fortuno_VERSION_MINOR ${Fortuno_VERSION_MINOR} PARENT_SCOPE) - set(Fortuno_VERSION_PATCH ${Fortuno_VERSION_PATCH} PARENT_SCOPE) - set(Fortuno_VERSION_TWEAK ${Fortuno_VERSION_TWEAK} PARENT_SCOPE) - else () - return( + if (CMAKE_VERSION VERSION_LESS 3.25) + # TODO: Remove when required minimum cmake version is >= 3.25 + set(Fortuno_VERSION ${Fortuno_VERSION} PARENT_SCOPE) + set(Fortuno_VERSION_MAJOR ${Fortuno_VERSION_MAJOR} PARENT_SCOPE) + set(Fortuno_VERSION_MINOR ${Fortuno_VERSION_MINOR} PARENT_SCOPE) + set(Fortuno_VERSION_PATCH ${Fortuno_VERSION_PATCH} PARENT_SCOPE) + set(Fortuno_VERSION_TWEAK ${Fortuno_VERSION_TWEAK} PARENT_SCOPE) + else () + return( PROPAGATE Fortuno_VERSION Fortuno_VERSION_MAJOR Fortuno_VERSION_MINOR - Fortuno_VERSION_PATCH - Fortuno_VERSION_TWEAK - ) - endif () + Fortuno_VERSION_PATCH + Fortuno_VERSION_TWEAK + ) + endif () endif () diff --git a/cmake/FortunoHelpers.cmake b/cmake/FortunoHelpers.cmake index b4c8b84..c32b040 100644 --- a/cmake/FortunoHelpers.cmake +++ b/cmake/FortunoHelpers.cmake @@ -1,3 +1,7 @@ +# This file is part of Fortuno. +# Licensed under the BSD-2-Clause Plus Patent license. +# SPDX-License-Identifier: BSD-2-Clause-Patent + # Sets up the build type. function (fortuno_setup_build_type default_build_type) diff --git a/cmake/config.cmake b/cmake/config.cmake deleted file mode 100644 index e69de29..0000000 diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index a41c025..84f0e44 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -1,3 +1,7 @@ +# This file is part of Fortuno. +# Licensed under the BSD-2-Clause Plus Patent license. +# SPDX-License-Identifier: BSD-2-Clause-Patent + list(APPEND CMAKE_MESSAGE_CONTEXT Example) add_library(Fortuno_example_mylib) diff --git a/example/meson.build b/example/meson.build index 33cba19..5737d98 100644 --- a/example/meson.build +++ b/example/meson.build @@ -1,3 +1,7 @@ +# This file is part of Fortuno. +# Licensed under the BSD-2-Clause Plus Patent license. +# SPDX-License-Identifier: BSD-2-Clause-Patent + example_mylib_lib = library( 'mylib', sources: ['mylib.f90'], diff --git a/meson.build b/meson.build index 752454e..e3914e3 100644 --- a/meson.build +++ b/meson.build @@ -1,3 +1,7 @@ +# This file is part of Fortuno. +# Licensed under the BSD-2-Clause Plus Patent license. +# SPDX-License-Identifier: BSD-2-Clause-Patent + project( 'fortuno', 'fortran', diff --git a/meson_options.txt b/meson_options.txt index 9ec9ca1..0df8465 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1 +1,5 @@ +# This file is part of Fortuno. +# Licensed under the BSD-2-Clause Plus Patent license. +# SPDX-License-Identifier: BSD-2-Clause-Patent + option('build_examples', type: 'boolean', value: false, description: 'Build examples') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f101e97..84883cb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,3 +1,7 @@ +# This file is part of Fortuno. +# Licensed under the BSD-2-Clause Plus Patent license. +# SPDX-License-Identifier: BSD-2-Clause-Patent + target_sources( Fortuno PRIVATE fortuno.f90 diff --git a/src/fortuno/CMakeLists.txt b/src/fortuno/CMakeLists.txt index d97a465..bddfec8 100644 --- a/src/fortuno/CMakeLists.txt +++ b/src/fortuno/CMakeLists.txt @@ -1,3 +1,7 @@ +# This file is part of Fortuno. +# Licensed under the BSD-2-Clause Plus Patent license. +# SPDX-License-Identifier: BSD-2-Clause-Patent + target_sources( Fortuno PRIVATE argumentparser.f90 diff --git a/src/fortuno/meson.build b/src/fortuno/meson.build index 1e0ff2f..1995cc1 100644 --- a/src/fortuno/meson.build +++ b/src/fortuno/meson.build @@ -1,3 +1,7 @@ +# This file is part of Fortuno. +# Licensed under the BSD-2-Clause Plus Patent license. +# SPDX-License-Identifier: BSD-2-Clause-Patent + sources += files( 'argumentparser.f90', 'basetypes.f90', diff --git a/src/fortuno/serial/CMakeLists.txt b/src/fortuno/serial/CMakeLists.txt index d349a26..e2ce1fa 100644 --- a/src/fortuno/serial/CMakeLists.txt +++ b/src/fortuno/serial/CMakeLists.txt @@ -1,3 +1,7 @@ +# This file is part of Fortuno. +# Licensed under the BSD-2-Clause Plus Patent license. +# SPDX-License-Identifier: BSD-2-Clause-Patent + target_sources( Fortuno PRIVATE serialbasetypes.f90 diff --git a/src/fortuno/serial/meson.build b/src/fortuno/serial/meson.build index 492007e..0e613ee 100644 --- a/src/fortuno/serial/meson.build +++ b/src/fortuno/serial/meson.build @@ -1,3 +1,7 @@ +# This file is part of Fortuno. +# Licensed under the BSD-2-Clause Plus Patent license. +# SPDX-License-Identifier: BSD-2-Clause-Patent + sources += files( 'serialbasetypes.f90', 'serialcase.f90', diff --git a/src/meson.build b/src/meson.build index df17f4f..a300129 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,3 +1,7 @@ +# This file is part of Fortuno. +# Licensed under the BSD-2-Clause Plus Patent license. +# SPDX-License-Identifier: BSD-2-Clause-Patent + sources += files( 'fortuno.f90' ) diff --git a/test/export/CMakeLists.txt b/test/export/CMakeLists.txt index c7ea234..a1976d8 100644 --- a/test/export/CMakeLists.txt +++ b/test/export/CMakeLists.txt @@ -1,3 +1,7 @@ +# This file is part of Fortuno. +# Licensed under the BSD-2-Clause Plus Patent license. +# SPDX-License-Identifier: BSD-2-Clause-Patent + cmake_minimum_required(VERSION 3.22...3.28) project( diff --git a/test/export/app/CMakeLists.txt b/test/export/app/CMakeLists.txt index f561445..d7ad169 100644 --- a/test/export/app/CMakeLists.txt +++ b/test/export/app/CMakeLists.txt @@ -1,2 +1,6 @@ +# This file is part of Fortuno. +# Licensed under the BSD-2-Clause Plus Patent license. +# SPDX-License-Identifier: BSD-2-Clause-Patent + target_sources(testapp PRIVATE testapp.f90) target_link_libraries(testapp PRIVATE Fortuno::Fortuno) diff --git a/test/export/app/meson.build b/test/export/app/meson.build index ed0c7a5..8cc8ea9 100644 --- a/test/export/app/meson.build +++ b/test/export/app/meson.build @@ -1,3 +1,7 @@ +# This file is part of Fortuno. +# Licensed under the BSD-2-Clause Plus Patent license. +# SPDX-License-Identifier: BSD-2-Clause-Patent + sources += files( 'testapp.f90' ) diff --git a/test/export/app/testapp.f90 b/test/export/app/testapp.f90 index 657f7d5..8ecb816 100644 --- a/test/export/app/testapp.f90 +++ b/test/export/app/testapp.f90 @@ -1,3 +1,7 @@ +! This file is part of Fortuno. +! Licensed under the BSD-2-Clause Plus Patent license. +! SPDX-License-Identifier: BSD-2-Clause-Patent + !> Test app driving Fortuno unit tests. program testapp use fortuno, only : execute_serial_cmd_app, is_equal, test => serial_case_item,& diff --git a/test/export/meson.build b/test/export/meson.build index e918e6c..52643ab 100644 --- a/test/export/meson.build +++ b/test/export/meson.build @@ -1,3 +1,7 @@ +# This file is part of Fortuno. +# Licensed under the BSD-2-Clause Plus Patent license. +# SPDX-License-Identifier: BSD-2-Clause-Patent + project( 'fortuno_test_export', 'fortran', diff --git a/test/export/meson_options.txt b/test/export/meson_options.txt index 1c071c1..967559e 100644 --- a/test/export/meson_options.txt +++ b/test/export/meson_options.txt @@ -1,3 +1,7 @@ +# This file is part of Fortuno. +# Licensed under the BSD-2-Clause Plus Patent license. +# SPDX-License-Identifier: BSD-2-Clause-Patent + option( 'fortuno_subproject', type: 'boolean',