[med-svn] [Git][med-team/libmcfp][upstream] New upstream version 1.3.5

Maarten L. Hekkelman (@mhekkel-guest) gitlab at salsa.debian.org
Tue Jan 28 12:18:01 GMT 2025



Maarten L. Hekkelman pushed to branch upstream at Debian Med / libmcfp


Commits:
7c8346c6 by Maarten L. Hekkelman at 2025-01-28T13:12:59+01:00
New upstream version 1.3.5
- - - - -


4 changed files:

- CMakeLists.txt
- changelog
- test/CMakeLists.txt
- test/unit-test.cpp


Changes:

=====================================
CMakeLists.txt
=====================================
@@ -6,10 +6,10 @@
 # modification, are permitted provided that the following conditions are met:
 #
 # 1. Redistributions of source code must retain the above copyright notice, this
-#    list of conditions and the following disclaimer
+# list of conditions and the following disclaimer
 # 2. Redistributions in binary form must reproduce the above copyright notice,
-#    this list of conditions and the following disclaimer in the documentation
-#    and/or other materials provided with the distribution.
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
 #
 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -25,7 +25,7 @@
 cmake_minimum_required(VERSION 3.23)
 
 # set the project name
-project(mcfp VERSION 1.3.4 LANGUAGES CXX)
+project(mcfp VERSION 1.3.5 LANGUAGES CXX)
 
 list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
 
@@ -53,19 +53,19 @@ if(MSVC)
 	# make msvc standards compliant...
 	add_compile_options(/permissive-)
 
-    if(${CMAKE_SYSTEM_VERSION} GREATER_EQUAL 10) # Windows 10
-        add_definitions(-D _WIN32_WINNT=0x0A00)
-    elseif(${CMAKE_SYSTEM_VERSION} EQUAL 6.3) # Windows 8.1
-        add_definitions(-D _WIN32_WINNT=0x0603)
-    elseif(${CMAKE_SYSTEM_VERSION} EQUAL 6.2) # Windows 8
-        add_definitions(-D _WIN32_WINNT=0x0602)
-    elseif(${CMAKE_SYSTEM_VERSION} EQUAL 6.1) # Windows 7
-        add_definitions(-D _WIN32_WINNT=0x0601)
-    elseif(${CMAKE_SYSTEM_VERSION} EQUAL 6.0) # Windows Vista
-        add_definitions(-D _WIN32_WINNT=0x0600)
-    else() # Windows XP (5.1)
-        add_definitions(-D _WIN32_WINNT=0x0501)
-    endif()
+	if(${CMAKE_SYSTEM_VERSION} GREATER_EQUAL 10) # Windows 10
+		add_definitions(-D _WIN32_WINNT=0x0A00)
+	elseif(${CMAKE_SYSTEM_VERSION} EQUAL 6.3) # Windows 8.1
+		add_definitions(-D _WIN32_WINNT=0x0603)
+	elseif(${CMAKE_SYSTEM_VERSION} EQUAL 6.2) # Windows 8
+		add_definitions(-D _WIN32_WINNT=0x0602)
+	elseif(${CMAKE_SYSTEM_VERSION} EQUAL 6.1) # Windows 7
+		add_definitions(-D _WIN32_WINNT=0x0601)
+	elseif(${CMAKE_SYSTEM_VERSION} EQUAL 6.0) # Windows Vista
+		add_definitions(-D _WIN32_WINNT=0x0600)
+	else() # Windows XP (5.1)
+		add_definitions(-D _WIN32_WINNT=0x0501)
+	endif()
 
 	add_definitions(-DNOMINMAX)
 endif()
@@ -117,12 +117,16 @@ install(EXPORT mcfp
 configure_package_config_file(${PROJECT_SOURCE_DIR}/cmake/mcfpConfig.cmake.in
 	${CMAKE_CURRENT_BINARY_DIR}/mcfpConfig.cmake
 	INSTALL_DESTINATION lib/cmake/mcfp)
+write_basic_package_version_file(
+	${CMAKE_CURRENT_BINARY_DIR}/mcfpConfigVersion.cmake
+	VERSION ${PROJECT_VERSION}
+	COMPATIBILITY AnyNewerVersion)
 
 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/mcfpConfig.cmake"
+ 	"${CMAKE_CURRENT_BINARY_DIR}/mcfpConfigVersion.cmake"
 	DESTINATION lib/cmake/mcfp)
 
 # Install old config file, for use in older code
-
 install(EXPORT mcfp
 	NAMESPACE libmcfp::
 	DESTINATION lib/cmake/libmcfp
@@ -131,8 +135,13 @@ install(EXPORT mcfp
 configure_package_config_file(${PROJECT_SOURCE_DIR}/cmake/libmcfpConfig.cmake.in
 	${CMAKE_CURRENT_BINARY_DIR}/libmcfpConfig.cmake
 	INSTALL_DESTINATION lib/cmake/libmcfp)
+write_basic_package_version_file(
+	${CMAKE_CURRENT_BINARY_DIR}/libmcfpConfigVersion.cmake
+	VERSION ${PROJECT_VERSION}
+	COMPATIBILITY AnyNewerVersion)
 
 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libmcfpConfig.cmake"
+	"${CMAKE_CURRENT_BINARY_DIR}/libmcfpConfigVersion.cmake"
 	DESTINATION lib/cmake/libmcfp)
 
 if(BUILD_TESTING)
@@ -142,4 +151,3 @@ endif()
 if(BUILD_DOCUMENTATION)
 	add_subdirectory(docs)
 endif()
-


=====================================
changelog
=====================================
@@ -1,3 +1,7 @@
+Version 1.3.5
+- Install a cmake version file
+- Avoid using catch2 version 2
+
 Version 1.3.4
 - Renaming the mcfp to libmcfp was not very consistent
   with the naming of all the other libraries I write.


=====================================
test/CMakeLists.txt
=====================================
@@ -1,6 +1,6 @@
 
 if(NOT(Catch2_FOUND OR TARGET Catch2))
-	find_package(Catch2 QUIET)
+	find_package(Catch2 3 QUIET)
 
 	if(NOT Catch2_FOUND)
 		include(FetchContent)
@@ -8,11 +8,9 @@ if(NOT(Catch2_FOUND OR TARGET Catch2))
 		FetchContent_Declare(
 			Catch2
 			GIT_REPOSITORY https://github.com/catchorg/Catch2.git
-			GIT_TAG v2.13.9)
+			GIT_TAG v3.8.0)
 
 		FetchContent_MakeAvailable(Catch2)
-
-		set(Catch2_VERSION "2.13.9")
 	endif()
 endif()
 
@@ -20,12 +18,6 @@ add_executable(mcfp-unit-test ${CMAKE_CURRENT_SOURCE_DIR}/unit-test.cpp)
 
 target_link_libraries(mcfp-unit-test mcfp::mcfp Catch2::Catch2)
 
-if(${Catch2_VERSION} VERSION_GREATER_EQUAL 3.0.0)
-	target_compile_definitions(mcfp-unit-test PUBLIC CATCH22=0)
-else()
-	target_compile_definitions(mcfp-unit-test PUBLIC CATCH22=1)
-endif()
-
 if(MSVC)
 	# Specify unwind semantics so that MSVC knowns how to handle exceptions
 	target_compile_options(mcfp-unit-test PRIVATE /EHsc)


=====================================
test/unit-test.cpp
=====================================
@@ -26,11 +26,7 @@
 
 #define CATCH_CONFIG_RUNNER
 
-#if CATCH22
-# include <catch2/catch.hpp>
-#else
-# include <catch2/catch_all.hpp>
-#endif
+#include <catch2/catch_all.hpp>
 
 #include <filesystem>
 
@@ -45,12 +41,7 @@ int main(int argc, char *argv[])
 	Catch::Session session; // There must be exactly one instance
 
 	// Build a new parser on top of Catch2's
-#if CATCH22
-	using namespace Catch::clara;
-#else
-	// Build a new parser on top of Catch2's
 	using namespace Catch::Clara;
-#endif
 
 	auto cli = session.cli()                                // Get Catch2's command line parser
 	           | Opt(gTestDir, "data-dir")                  // bind variable to a new option, with a hint string



View it on GitLab: https://salsa.debian.org/med-team/libmcfp/-/commit/7c8346c68dcb0d5bd344631f30233df88523b1ee

-- 
View it on GitLab: https://salsa.debian.org/med-team/libmcfp/-/commit/7c8346c68dcb0d5bd344631f30233df88523b1ee
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20250128/3c37c1ce/attachment-0001.htm>


More information about the debian-med-commit mailing list