From 92f03bc5c70ca37ae8f8d8ebfc797e8b407c2be3 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Fri, 18 Aug 2023 16:55:55 +0300 Subject: [PATCH] embag: revert to using a patch Otherwise would need to add /Zc:__cplusplus to exported cxxflags. --- recipes/embag/all/CMakeLists.txt | 5 ----- recipes/embag/all/conanfile.py | 6 ++++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/recipes/embag/all/CMakeLists.txt b/recipes/embag/all/CMakeLists.txt index 6638694bdd2b6..1f9b3ed4a4278 100644 --- a/recipes/embag/all/CMakeLists.txt +++ b/recipes/embag/all/CMakeLists.txt @@ -19,11 +19,6 @@ target_link_libraries(embag PUBLIC BZip2::BZip2 ) -if (MSVC) - # For a #if __cplusplus < 201402L check in lib/util.h - target_compile_options(embag PRIVATE /Zc:__cplusplus) -endif() - install(TARGETS embag) install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/embag diff --git a/recipes/embag/all/conanfile.py b/recipes/embag/all/conanfile.py index 843797ac73db8..fa9122cd145e6 100644 --- a/recipes/embag/all/conanfile.py +++ b/recipes/embag/all/conanfile.py @@ -67,7 +67,13 @@ def generate(self): deps = CMakeDeps(self) deps.generate() + def _patch_sources(self): + # Disable a C++11 workaround that is broken on MSVC + replace_in_file(self, os.path.join(self.source_folder, "lib", "util.h"), + "#if __cplusplus < 201402L", "#if false") + def build(self): + self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build()