Skip to content

Commit

Permalink
embag: revert to using a patch
Browse files Browse the repository at this point in the history
Otherwise would need to add /Zc:__cplusplus to exported cxxflags.
  • Loading branch information
valgur committed Aug 18, 2023
1 parent b0e9656 commit 92f03bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 0 additions & 5 deletions recipes/embag/all/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions recipes/embag/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 92f03bc

Please sign in to comment.