Skip to content

Commit

Permalink
libkml: add check_min_cppstd(self, 98)
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Apr 20, 2024
1 parent db2b057 commit f299f02
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion recipes/libkml/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, save
from conan.tools.microsoft import is_msvc, is_msvc_static_runtime

Check warning on line 6 in recipes/libkml/all/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Unused is_msvc imported from conan.tools.microsoft
Expand Down Expand Up @@ -49,7 +50,9 @@ def requirements(self):
self.requires("zlib/[>=1.2.11 <2]")

def validate(self):
if self.options.shared and is_msvc(self) and is_msvc_static_runtime(self):
if self.settings.compiler.cppstd:
check_min_cppstd(self, 98)
if self.options.shared and is_msvc_static_runtime(self):
raise ConanInvalidConfiguration(f"{self.ref} shared with Visual Studio and MT runtime is not supported")

def source(self):
Expand Down

0 comments on commit f299f02

Please sign in to comment.