From 222b3c7aaf0bdd11d0615881c03d0d0ba2c71066 Mon Sep 17 00:00:00 2001 From: elejke Date: Sat, 25 Mar 2023 14:48:38 +0300 Subject: [PATCH 01/16] wil recipe added --- recipes/wil/all/conandata.yml | 4 + recipes/wil/all/conanfile.py | 102 ++++++++++++++++++ recipes/wil/all/test_package/CMakeLists.txt | 10 ++ recipes/wil/all/test_package/conanfile.py | 27 +++++ recipes/wil/all/test_package/test_package.cpp | 10 ++ .../wil/all/test_v1_package/CMakeLists.txt | 8 ++ recipes/wil/all/test_v1_package/conanfile.py | 19 ++++ recipes/wil/config.yml | 3 + 8 files changed, 183 insertions(+) create mode 100644 recipes/wil/all/conandata.yml create mode 100644 recipes/wil/all/conanfile.py create mode 100644 recipes/wil/all/test_package/CMakeLists.txt create mode 100644 recipes/wil/all/test_package/conanfile.py create mode 100644 recipes/wil/all/test_package/test_package.cpp create mode 100644 recipes/wil/all/test_v1_package/CMakeLists.txt create mode 100644 recipes/wil/all/test_v1_package/conanfile.py create mode 100644 recipes/wil/config.yml diff --git a/recipes/wil/all/conandata.yml b/recipes/wil/all/conandata.yml new file mode 100644 index 0000000000000..0511be8873e3e --- /dev/null +++ b/recipes/wil/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.0.230202.1": + url: "https://github.com/microsoft/wil/archive/refs/tags/v1.0.230202.1.tar.gz" + sha256: "7bf01e9d93fb93f0fe2614492fac4a423b3a97b435015db74f5ac4a0270ebc8a" diff --git a/recipes/wil/all/conanfile.py b/recipes/wil/all/conanfile.py new file mode 100644 index 0000000000000..b65fafcd0f85d --- /dev/null +++ b/recipes/wil/all/conanfile.py @@ -0,0 +1,102 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + + +required_conan_version = ">=1.52.0" + + +class WilConan(ConanFile): + name = "wil" + description = ( + "The Windows Implementation Libraries (WIL) is a header-only C++ library" + "created to make life easier for developers on Windows through readable" + "type-safe C++ interfaces for common Windows coding patterns." + ) + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/microsoft/wil" + topics = ("win", "wil", "header-only") + package_type = "header-library" + # only arch is aplicable, windows library + settings = "os", "arch", "compiler", "build_type" + # Do not copy sources to build folder for header only projects, unless you need to apply patches + no_copy_source = True + + @property + def _compilers_minimum_version(self): + return { + "Visual Studio": "15", + "msvc": "14.1", + "gcc": "5", + "clang": "5", + "apple-clang": "5.1", + } + + # About compiler version: https://github.com/microsoft/wil/issues/207#issuecomment-991722592 + def export_sources(self): + export_conandata_patches(self) + + def layout(self): + # src_folder must use the same source folder name than the project + basic_layout(self, src_folder="include/wil") + + # same package ID for any package + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + # Validate the minimum cpp standard supported when installing the package. For C++ projects only + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + if self.settings.os != "Windows": + raise ConanInvalidConfiguration(f"{self.ref} can be used only on Windows.") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + apply_conandata_patches(self) + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy( + self, + pattern="*.h", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include"), + ) + + def package_info(self): + # Folders not used for header-only + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + + # Set these to the appropriate values if the package has an official FindPACKAGE.cmake + # listed in https://cmake.org/cmake/help/latest/manual/cmake-modules.7.html#find-modules + # examples: bzip2, freetype, gdal, icu, libcurl, libjpeg, libpng, libtiff, openssl, sqlite3, zlib... + self.cpp_info.set_property("cmake_module_file_name", "WIL") + self.cpp_info.set_property("cmake_module_target_name", "WIL::WIL") + # Set these to the appropriate values if package provides a CMake config file + # (package-config.cmake or packageConfig.cmake, with package::package target, usually installed in /lib/cmake//) + self.cpp_info.set_property("cmake_file_name", "wil") + self.cpp_info.set_property("cmake_target_name", "wil::wil") + # Set this to the appropriate value if the package provides a pkgconfig file + # (package.pc, usually installed in /lib/pkgconfig/) + self.cpp_info.set_property("pkg_config_name", "wil") + + # TODO: to remove in conan v2 once cmake_find_package_* generators removed + self.cpp_info.filenames["cmake_find_package"] = "WIL" + self.cpp_info.filenames["cmake_find_package_multi"] = "wil" + self.cpp_info.names["cmake_find_package"] = "WIL" + self.cpp_info.names["cmake_find_package_multi"] = "WIL" diff --git a/recipes/wil/all/test_package/CMakeLists.txt b/recipes/wil/all/test_package/CMakeLists.txt new file mode 100644 index 0000000000000..295d244481f17 --- /dev/null +++ b/recipes/wil/all/test_package/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) + +find_package(wil REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) + +target_link_libraries(${PROJECT_NAME} PRIVATE wil::wil) + +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/wil/all/test_package/conanfile.py b/recipes/wil/all/test_package/conanfile.py new file mode 100644 index 0000000000000..48499fa0989d9 --- /dev/null +++ b/recipes/wil/all/test_package/conanfile.py @@ -0,0 +1,27 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake +import os + + +# It will become the standard on Conan 2.x +class TestPackageConan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/wil/all/test_package/test_package.cpp b/recipes/wil/all/test_package/test_package.cpp new file mode 100644 index 0000000000000..d00df37ebe25a --- /dev/null +++ b/recipes/wil/all/test_package/test_package.cpp @@ -0,0 +1,10 @@ +#include +#include +#include "wil/resource.h" + + +int main(void) { + std::cout << "wil/resource.h included correctly" std::endl;" + + return EXIT_SUCCESS; +} diff --git a/recipes/wil/all/test_v1_package/CMakeLists.txt b/recipes/wil/all/test_v1_package/CMakeLists.txt new file mode 100644 index 0000000000000..9d54a092e0a67 --- /dev/null +++ b/recipes/wil/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) + +include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup(TARGETS) + +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/ + ${CMAKE_CURRENT_BINARY_DIR}/test_package/) diff --git a/recipes/wil/all/test_v1_package/conanfile.py b/recipes/wil/all/test_v1_package/conanfile.py new file mode 100644 index 0000000000000..c492184eec19c --- /dev/null +++ b/recipes/wil/all/test_v1_package/conanfile.py @@ -0,0 +1,19 @@ +from conans import ConanFile, CMake +from conan.tools.build import cross_building +import os + + +# legacy validation with Conan 1.x +class TestPackageV1Conan(ConanFile): + settings = "os", "arch", "compiler", "build_type" + generators = "cmake", "cmake_find_package_multi" + + def build(self): + cmake = CMake(self) + cmake.configure() + cmake.build() + + def test(self): + if not cross_building(self): + bin_path = os.path.join("bin", "test_package") + self.run(bin_path, run_environment=True) diff --git a/recipes/wil/config.yml b/recipes/wil/config.yml new file mode 100644 index 0000000000000..5d004c574dfa1 --- /dev/null +++ b/recipes/wil/config.yml @@ -0,0 +1,3 @@ +versions: + "1.0.230202.1": + folder: "all" From c4f80d974fa41afc2ad1b13491071e8a6b336b5e Mon Sep 17 00:00:00 2001 From: elejke Date: Sat, 25 Mar 2023 14:56:51 +0300 Subject: [PATCH 02/16] fix test_package --- recipes/wil/all/test_package/test_package.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/wil/all/test_package/test_package.cpp b/recipes/wil/all/test_package/test_package.cpp index d00df37ebe25a..0a7953c007845 100644 --- a/recipes/wil/all/test_package/test_package.cpp +++ b/recipes/wil/all/test_package/test_package.cpp @@ -4,7 +4,7 @@ int main(void) { - std::cout << "wil/resource.h included correctly" std::endl;" + std::cout << "wil/resource.h included correctly" << std::endl; return EXIT_SUCCESS; } From 657ee0b2d67c739aedb849ae301b5031daf88991 Mon Sep 17 00:00:00 2001 From: elejke Date: Sat, 25 Mar 2023 17:04:01 +0300 Subject: [PATCH 03/16] added _min_cpp to the recipe --- recipes/wil/all/conanfile.py | 4 ++++ recipes/wil/all/test_package/CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/recipes/wil/all/conanfile.py b/recipes/wil/all/conanfile.py index b65fafcd0f85d..fb32b55cc97c7 100644 --- a/recipes/wil/all/conanfile.py +++ b/recipes/wil/all/conanfile.py @@ -27,6 +27,10 @@ class WilConan(ConanFile): # Do not copy sources to build folder for header only projects, unless you need to apply patches no_copy_source = True + @property + def _min_cppstd(self): + return 11 + @property def _compilers_minimum_version(self): return { diff --git a/recipes/wil/all/test_package/CMakeLists.txt b/recipes/wil/all/test_package/CMakeLists.txt index 295d244481f17..ad8a1fdd0d7f3 100644 --- a/recipes/wil/all/test_package/CMakeLists.txt +++ b/recipes/wil/all/test_package/CMakeLists.txt @@ -7,4 +7,4 @@ add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE wil::wil) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) From c1ed2e040521350c3b58bb82b481f6668e02ab20 Mon Sep 17 00:00:00 2001 From: elejke Date: Sat, 25 Mar 2023 17:05:37 +0300 Subject: [PATCH 04/16] fixed layot --- recipes/wil/all/conanfile.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes/wil/all/conanfile.py b/recipes/wil/all/conanfile.py index fb32b55cc97c7..68c1be2129d84 100644 --- a/recipes/wil/all/conanfile.py +++ b/recipes/wil/all/conanfile.py @@ -46,8 +46,7 @@ def export_sources(self): export_conandata_patches(self) def layout(self): - # src_folder must use the same source folder name than the project - basic_layout(self, src_folder="include/wil") + basic_layout(self, src_folder="src") # same package ID for any package def package_id(self): From 423c96e3b1691cdd36b3cfda881078c8458790c1 Mon Sep 17 00:00:00 2001 From: elejke Date: Sun, 2 Apr 2023 13:49:08 +0300 Subject: [PATCH 05/16] fixes --- recipes/wil/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/wil/all/conanfile.py b/recipes/wil/all/conanfile.py index 68c1be2129d84..5aee7d88b0db8 100644 --- a/recipes/wil/all/conanfile.py +++ b/recipes/wil/all/conanfile.py @@ -24,7 +24,7 @@ class WilConan(ConanFile): package_type = "header-library" # only arch is aplicable, windows library settings = "os", "arch", "compiler", "build_type" - # Do not copy sources to build folder for header only projects, unless you need to apply patches + no_copy_source = True @property From 24572fe7434a40c024078ee18981093186a201c7 Mon Sep 17 00:00:00 2001 From: elejke Date: Sun, 2 Apr 2023 13:54:45 +0300 Subject: [PATCH 06/16] removed camke_module_file_name/cmake_module_target_name --- recipes/wil/all/conanfile.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/recipes/wil/all/conanfile.py b/recipes/wil/all/conanfile.py index 5aee7d88b0db8..c4ec9f35537cf 100644 --- a/recipes/wil/all/conanfile.py +++ b/recipes/wil/all/conanfile.py @@ -85,11 +85,6 @@ def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] - # Set these to the appropriate values if the package has an official FindPACKAGE.cmake - # listed in https://cmake.org/cmake/help/latest/manual/cmake-modules.7.html#find-modules - # examples: bzip2, freetype, gdal, icu, libcurl, libjpeg, libpng, libtiff, openssl, sqlite3, zlib... - self.cpp_info.set_property("cmake_module_file_name", "WIL") - self.cpp_info.set_property("cmake_module_target_name", "WIL::WIL") # Set these to the appropriate values if package provides a CMake config file # (package-config.cmake or packageConfig.cmake, with package::package target, usually installed in /lib/cmake//) self.cpp_info.set_property("cmake_file_name", "wil") @@ -99,7 +94,7 @@ def package_info(self): self.cpp_info.set_property("pkg_config_name", "wil") # TODO: to remove in conan v2 once cmake_find_package_* generators removed - self.cpp_info.filenames["cmake_find_package"] = "WIL" + self.cpp_info.filenames["cmake_find_package"] = "wil" self.cpp_info.filenames["cmake_find_package_multi"] = "wil" - self.cpp_info.names["cmake_find_package"] = "WIL" - self.cpp_info.names["cmake_find_package_multi"] = "WIL" + self.cpp_info.names["cmake_find_package"] = "wil" + self.cpp_info.names["cmake_find_package_multi"] = "wil" From 5fd86610f0236631622661797c21ad1e1bc8b4cd Mon Sep 17 00:00:00 2001 From: elejke Date: Sun, 2 Apr 2023 14:27:16 +0300 Subject: [PATCH 07/16] added patch for type conversion --- recipes/wil/all/conandata.yml | 5 +++++ .../1.0.230202.1-0001-fix-type-conversion.patch | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 recipes/wil/all/patches/1.0.230202.1-0001-fix-type-conversion.patch diff --git a/recipes/wil/all/conandata.yml b/recipes/wil/all/conandata.yml index 0511be8873e3e..cd7035163b8f0 100644 --- a/recipes/wil/all/conandata.yml +++ b/recipes/wil/all/conandata.yml @@ -2,3 +2,8 @@ sources: "1.0.230202.1": url: "https://github.com/microsoft/wil/archive/refs/tags/v1.0.230202.1.tar.gz" sha256: "7bf01e9d93fb93f0fe2614492fac4a423b3a97b435015db74f5ac4a0270ebc8a" +patches: + "1.0.230202.1": + - patch_file: "patches/1.0.230202.1-0001-fix-type-conversion.patch" + patch_description: "Explicitly writing the type instead of using decltype" + patch_type: "conan" diff --git a/recipes/wil/all/patches/1.0.230202.1-0001-fix-type-conversion.patch b/recipes/wil/all/patches/1.0.230202.1-0001-fix-type-conversion.patch new file mode 100644 index 0000000000000..076f6d69cd8cc --- /dev/null +++ b/recipes/wil/all/patches/1.0.230202.1-0001-fix-type-conversion.patch @@ -0,0 +1,11 @@ +--- a/include/wil/resource.h ++++ b/include/wil/resource.h +@@ -2547,7 +2547,7 @@ namespace wil + } + + template +- using unique_private_namespace = unique_any_handle_null_only), &details::ClosePrivateNamespaceHelper>; ++ using unique_private_namespace = unique_any_handle_null_only>;^M + + using unique_private_namespace_close = unique_private_namespace<>; + using unique_private_namespace_destroy = unique_private_namespace; From f0680e3972d1ce838ef74ffb3386f0b07f49a985 Mon Sep 17 00:00:00 2001 From: German Novikov Date: Sun, 2 Apr 2023 14:29:36 +0300 Subject: [PATCH 08/16] Update 1.0.230202.1-0001-fix-type-conversion.patch --- .../wil/all/patches/1.0.230202.1-0001-fix-type-conversion.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/wil/all/patches/1.0.230202.1-0001-fix-type-conversion.patch b/recipes/wil/all/patches/1.0.230202.1-0001-fix-type-conversion.patch index 076f6d69cd8cc..3144a0ddbd304 100644 --- a/recipes/wil/all/patches/1.0.230202.1-0001-fix-type-conversion.patch +++ b/recipes/wil/all/patches/1.0.230202.1-0001-fix-type-conversion.patch @@ -5,7 +5,7 @@ template - using unique_private_namespace = unique_any_handle_null_only), &details::ClosePrivateNamespaceHelper>; -+ using unique_private_namespace = unique_any_handle_null_only>;^M ++ using unique_private_namespace = unique_any_handle_null_only>; using unique_private_namespace_close = unique_private_namespace<>; using unique_private_namespace_destroy = unique_private_namespace; From 54afc5dd8d6cd13a4672dd379f81e269d19e8fc3 Mon Sep 17 00:00:00 2001 From: German Novikov Date: Thu, 6 Apr 2023 02:05:27 +0300 Subject: [PATCH 09/16] Update recipes/wil/all/conanfile.py Co-authored-by: Chris Mc --- recipes/wil/all/conanfile.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/recipes/wil/all/conanfile.py b/recipes/wil/all/conanfile.py index c4ec9f35537cf..682a50adeaae6 100644 --- a/recipes/wil/all/conanfile.py +++ b/recipes/wil/all/conanfile.py @@ -85,16 +85,12 @@ def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] - # Set these to the appropriate values if package provides a CMake config file - # (package-config.cmake or packageConfig.cmake, with package::package target, usually installed in /lib/cmake//) - self.cpp_info.set_property("cmake_file_name", "wil") - self.cpp_info.set_property("cmake_target_name", "wil::wil") - # Set this to the appropriate value if the package provides a pkgconfig file - # (package.pc, usually installed in /lib/pkgconfig/) - self.cpp_info.set_property("pkg_config_name", "wil") + # https://github.com/microsoft/wil/blob/56e3e5aa79234f8de3ceeeaf05b715b823bc2cca/CMakeLists.txt#L53 + self.cpp_info.set_property("cmake_file_name", "WIL") + self.cpp_info.set_property("cmake_target_name", "WIL::WILL") # TODO: to remove in conan v2 once cmake_find_package_* generators removed - self.cpp_info.filenames["cmake_find_package"] = "wil" - self.cpp_info.filenames["cmake_find_package_multi"] = "wil" - self.cpp_info.names["cmake_find_package"] = "wil" - self.cpp_info.names["cmake_find_package_multi"] = "wil" + self.cpp_info.filenames["cmake_find_package"] = "WIL" + self.cpp_info.filenames["cmake_find_package_multi"] = "WIL" + self.cpp_info.names["cmake_find_package"] = "WIL" + self.cpp_info.names["cmake_find_package_multi"] = "WIL" From e79d053a7910caa8ec47f10a19d89ec1254fab41 Mon Sep 17 00:00:00 2001 From: German Novikov Date: Thu, 6 Apr 2023 02:05:39 +0300 Subject: [PATCH 10/16] Update recipes/wil/all/test_package/CMakeLists.txt Co-authored-by: Chris Mc --- recipes/wil/all/test_package/CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/recipes/wil/all/test_package/CMakeLists.txt b/recipes/wil/all/test_package/CMakeLists.txt index ad8a1fdd0d7f3..5cc9ea385c984 100644 --- a/recipes/wil/all/test_package/CMakeLists.txt +++ b/recipes/wil/all/test_package/CMakeLists.txt @@ -1,10 +1,8 @@ cmake_minimum_required(VERSION 3.8) project(test_package LANGUAGES CXX) -find_package(wil REQUIRED CONFIG) +find_package(WIL REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) - -target_link_libraries(${PROJECT_NAME} PRIVATE wil::wil) - +target_link_libraries(${PROJECT_NAME} PRIVATE WIL::WIL) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) From 7f709eadc1487f7857b6b99dd1360221f7839aab Mon Sep 17 00:00:00 2001 From: German Novikov Date: Sat, 8 Apr 2023 08:53:42 +0300 Subject: [PATCH 11/16] Update conanfile.py --- recipes/wil/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/wil/all/conanfile.py b/recipes/wil/all/conanfile.py index 682a50adeaae6..3cab4bf0f415a 100644 --- a/recipes/wil/all/conanfile.py +++ b/recipes/wil/all/conanfile.py @@ -87,7 +87,7 @@ def package_info(self): # https://github.com/microsoft/wil/blob/56e3e5aa79234f8de3ceeeaf05b715b823bc2cca/CMakeLists.txt#L53 self.cpp_info.set_property("cmake_file_name", "WIL") - self.cpp_info.set_property("cmake_target_name", "WIL::WILL") + self.cpp_info.set_property("cmake_target_name", "WIL::WIL") # TODO: to remove in conan v2 once cmake_find_package_* generators removed self.cpp_info.filenames["cmake_find_package"] = "WIL" From 7024cd9ca33ca349da2fe56c385d10ccd9a3363c Mon Sep 17 00:00:00 2001 From: German Novikov Date: Sat, 8 Apr 2023 08:59:10 +0300 Subject: [PATCH 12/16] fix patch type and added source --- recipes/wil/all/conandata.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes/wil/all/conandata.yml b/recipes/wil/all/conandata.yml index cd7035163b8f0..7ff8b5238f3ec 100644 --- a/recipes/wil/all/conandata.yml +++ b/recipes/wil/all/conandata.yml @@ -6,4 +6,5 @@ patches: "1.0.230202.1": - patch_file: "patches/1.0.230202.1-0001-fix-type-conversion.patch" patch_description: "Explicitly writing the type instead of using decltype" - patch_type: "conan" + patch_source: "https://github.com/microsoft/wil/issues/302#issuecomment-1482117200" + patch_type: "issue" From 882d39eee0ffd7504d27fe619434a7bf75f4a3d6 Mon Sep 17 00:00:00 2001 From: German Novikov Date: Sat, 8 Apr 2023 09:00:44 +0300 Subject: [PATCH 13/16] removed gcc and clang from _compilers_min_version --- recipes/wil/all/conanfile.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/recipes/wil/all/conanfile.py b/recipes/wil/all/conanfile.py index 3cab4bf0f415a..32f511bb89acf 100644 --- a/recipes/wil/all/conanfile.py +++ b/recipes/wil/all/conanfile.py @@ -35,10 +35,7 @@ def _min_cppstd(self): def _compilers_minimum_version(self): return { "Visual Studio": "15", - "msvc": "14.1", - "gcc": "5", - "clang": "5", - "apple-clang": "5.1", + "msvc": "14.1" } # About compiler version: https://github.com/microsoft/wil/issues/207#issuecomment-991722592 From 0db26703d513965d71691fa082cebbc422ff5cc8 Mon Sep 17 00:00:00 2001 From: elejke Date: Sat, 8 Apr 2023 09:26:32 +0300 Subject: [PATCH 14/16] fixed test_package.cpp --- recipes/wil/all/test_package/test_package.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipes/wil/all/test_package/test_package.cpp b/recipes/wil/all/test_package/test_package.cpp index 0a7953c007845..73b8b076ec5af 100644 --- a/recipes/wil/all/test_package/test_package.cpp +++ b/recipes/wil/all/test_package/test_package.cpp @@ -4,7 +4,9 @@ int main(void) { - std::cout << "wil/resource.h included correctly" << std::endl; - + SetLastError(42); + // check for simple function call: + auto error42 = wil::last_error_context(); + return EXIT_SUCCESS; } From 2d632bd78dd806be3aa30e3fd0ccd4a62103f4f2 Mon Sep 17 00:00:00 2001 From: elejke Date: Sat, 8 Apr 2023 09:34:53 +0300 Subject: [PATCH 15/16] changed type of patch to bugfix --- recipes/wil/all/conandata.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/wil/all/conandata.yml b/recipes/wil/all/conandata.yml index 7ff8b5238f3ec..6c88edbd59f9f 100644 --- a/recipes/wil/all/conandata.yml +++ b/recipes/wil/all/conandata.yml @@ -7,4 +7,4 @@ patches: - patch_file: "patches/1.0.230202.1-0001-fix-type-conversion.patch" patch_description: "Explicitly writing the type instead of using decltype" patch_source: "https://github.com/microsoft/wil/issues/302#issuecomment-1482117200" - patch_type: "issue" + patch_type: bugfix From c75ae5edd5d8e15be395f088fe571f7892fdcb30 Mon Sep 17 00:00:00 2001 From: Chris Mc Date: Mon, 10 Apr 2023 11:58:26 -0700 Subject: [PATCH 16/16] fixup: patch type should be portability since it adds support for vs 2017 --- recipes/wil/all/conandata.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipes/wil/all/conandata.yml b/recipes/wil/all/conandata.yml index 6c88edbd59f9f..c9a6344cdb846 100644 --- a/recipes/wil/all/conandata.yml +++ b/recipes/wil/all/conandata.yml @@ -6,5 +6,7 @@ patches: "1.0.230202.1": - patch_file: "patches/1.0.230202.1-0001-fix-type-conversion.patch" patch_description: "Explicitly writing the type instead of using decltype" - patch_source: "https://github.com/microsoft/wil/issues/302#issuecomment-1482117200" - patch_type: bugfix + patch_source: | + https://github.com/microsoft/wil/issues/302#issuecomment-1482117200 + https://github.com/microsoft/wil/pull/316 + patch_type: portability