Skip to content

Commit

Permalink
allow shared msvc if version >= 1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceIm committed Sep 22, 2022
1 parent ac450d6 commit cabf971
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions recipes/benchmark/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from conan.tools.build import cross_building
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
from conan.tools.files import copy, get, rmdir
from conan.tools.microsoft import is_msvc
from conan.tools.scm import Version
import os

Expand Down Expand Up @@ -47,9 +48,9 @@ def layout(self):

def validate(self):
if self.info.settings.compiler == "Visual Studio" and Version(self.info.settings.compiler.version) <= 12:
raise ConanInvalidConfiguration("f{self.ref} does not support Visual Studio <= 12")
if self.info.settings.os == "Windows" and self.info.options.shared:
raise ConanInvalidConfiguration("Windows shared builds are not supported right now, see issue #639")
raise ConanInvalidConfiguration(f"{self.ref} doesn't support Visual Studio <= 12")
if Version(self.version) < "1.7.0" and is_msvc(self) and self.info.options.shared:
raise ConanInvalidConfiguration(f"{self.ref} doesn't support msvc shared builds")

def source(self):
get(self, **self.conan_data["sources"][self.version],
Expand Down

0 comments on commit cabf971

Please sign in to comment.