Skip to content

Commit

Permalink
Set C++ if no cppstd is set to support apple-clang in Conan 1
Browse files Browse the repository at this point in the history
  • Loading branch information
AbrilRBS committed Apr 26, 2024
1 parent d77e120 commit 8519c8f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion recipes/dispenso/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import check_min_cppstd
from conan.tools.build import check_min_cppstd, valid_min_cppstd
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.files import copy, get, export_conandata_patches, apply_conandata_patches, rm, rmdir
from conan.tools.scm import Version
Expand Down Expand Up @@ -79,6 +79,10 @@ def generate(self):
# TODO: Missing $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-fvisibility=hidden> equivalent?
tc.preprocessor_definitions["NOMINMAX"] = 1
tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = 1
if not valid_min_cppstd(self, self._min_cppstd):
# TODO: Remove once Conan 1 is deprecated, this is needed so apple-clang
# can compile, as it defaults to C++98
tc.variables["CMAKE_CXX_STANDARD"] = self._min_cppstd
tc.generate()
tc = CMakeDeps(self)
tc.generate()
Expand Down

0 comments on commit 8519c8f

Please sign in to comment.