From eaee8ec33431b7f10ed1913e8e2bbb554ba4e884 Mon Sep 17 00:00:00 2001 From: FireWolf Date: Tue, 28 Feb 2023 00:56:13 -0800 Subject: [PATCH 1/4] antlr4-cppruntime: Build the shared/static library only instead of both of them as of 4.12.0. --- recipes/antlr4-cppruntime/all/conanfile.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recipes/antlr4-cppruntime/all/conanfile.py b/recipes/antlr4-cppruntime/all/conanfile.py index 89d2f483bf480..7c5c99c324070 100644 --- a/recipes/antlr4-cppruntime/all/conanfile.py +++ b/recipes/antlr4-cppruntime/all/conanfile.py @@ -92,6 +92,12 @@ def generate(self): if is_msvc(self): tc.cache_variables["WITH_STATIC_CRT"] = is_msvc_static_runtime(self) tc.variables["WITH_DEMO"] = False + # As of ANTLR 4.12.0, one can choose to build the shared/static library only instead of both of them + # Related Issue: https://github.com/antlr/antlr4/issues/3993 + # Related PR: https://github.com/antlr/antlr4/pull/3996 + if Version(self.version) > "4.12": + tc.variables["ANTLR_BUILD_SHARED"] = self.options.shared + tc.variables["ANTLR_BUILD_STATIC"] = not self.options.shared tc.generate() tc = CMakeDeps(self) tc.generate() From e8298191465bd7f13a74d14963c7ebe252e57a15 Mon Sep 17 00:00:00 2001 From: FireWolf Date: Tue, 28 Feb 2023 01:11:21 -0800 Subject: [PATCH 2/4] antlr4-cppruntime: Set the new CMake variables for 4.12.0 as well. --- recipes/antlr4-cppruntime/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/antlr4-cppruntime/all/conanfile.py b/recipes/antlr4-cppruntime/all/conanfile.py index 7c5c99c324070..338a93f58f2c4 100644 --- a/recipes/antlr4-cppruntime/all/conanfile.py +++ b/recipes/antlr4-cppruntime/all/conanfile.py @@ -95,7 +95,7 @@ def generate(self): # As of ANTLR 4.12.0, one can choose to build the shared/static library only instead of both of them # Related Issue: https://github.com/antlr/antlr4/issues/3993 # Related PR: https://github.com/antlr/antlr4/pull/3996 - if Version(self.version) > "4.12": + if Version(self.version) >= "4.12": tc.variables["ANTLR_BUILD_SHARED"] = self.options.shared tc.variables["ANTLR_BUILD_STATIC"] = not self.options.shared tc.generate() From cb83363c11a8330ef7045412db4288f7d7c1b0bf Mon Sep 17 00:00:00 2001 From: FireWolf Date: Tue, 21 Mar 2023 12:00:11 -0700 Subject: [PATCH 3/4] antlr4-cppruntime: Bump the dependency to `utfcpp/3.2.3`. --- recipes/antlr4-cppruntime/all/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/antlr4-cppruntime/all/conanfile.py b/recipes/antlr4-cppruntime/all/conanfile.py index 338a93f58f2c4..fdaf4e4f696fa 100644 --- a/recipes/antlr4-cppruntime/all/conanfile.py +++ b/recipes/antlr4-cppruntime/all/conanfile.py @@ -64,7 +64,7 @@ def requirements(self): # Reference: [C++] Remove libuuid dependency (https://github.com/antlr/antlr4/pull/3787) # Note that the above PR points that libuuid can be removed from 4.9.3, 4.10 and 4.10.1 as well. # We have patched the CMakeLists.txt to drop the dependency on libuuid from aforementioned antlr versions. - self.requires("utfcpp/3.2.1") + self.requires("utfcpp/3.2.3") def validate(self): # Compilation of this library on version 15 claims C2668 Error. From e21c294ebc3de83c716635ee0e09b878db67f148 Mon Sep 17 00:00:00 2001 From: FireWolf Date: Tue, 21 Mar 2023 17:02:14 -0700 Subject: [PATCH 4/4] antlr4-cppruntime: Drop the dependency `utfcpp` as of 4.10. --- recipes/antlr4-cppruntime/all/conanfile.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/recipes/antlr4-cppruntime/all/conanfile.py b/recipes/antlr4-cppruntime/all/conanfile.py index fdaf4e4f696fa..99a6339b6c746 100644 --- a/recipes/antlr4-cppruntime/all/conanfile.py +++ b/recipes/antlr4-cppruntime/all/conanfile.py @@ -60,11 +60,16 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - # As of 4.11, antlr4-cppruntime no longer requires libuuid. - # Reference: [C++] Remove libuuid dependency (https://github.com/antlr/antlr4/pull/3787) + # 1. As of 4.10, antlr4-cppruntime no longer requires `utfcpp`. + # Reference: [C++] Implement standalone Unicode encoding and decoding handling + # Link: https://github.com/antlr/antlr4/pull/3398 + # 2. As of 4.11, antlr4-cppruntime no longer requires `libuuid`. + # Reference: [C++] Remove libuuid dependency + # Link: https://github.com/antlr/antlr4/pull/3787 # Note that the above PR points that libuuid can be removed from 4.9.3, 4.10 and 4.10.1 as well. # We have patched the CMakeLists.txt to drop the dependency on libuuid from aforementioned antlr versions. - self.requires("utfcpp/3.2.3") + if Version(self.version) < "4.10": + self.requires("utfcpp/3.2.3") def validate(self): # Compilation of this library on version 15 claims C2668 Error.