Skip to content

Commit

Permalink
Move ConanInvalidConfiguration raise to validate()
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinDelille committed Jun 15, 2021
1 parent a757c69 commit 70d44e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions recipes/sdl/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@ def configure(self):
del self.options.fPIC
del self.settings.compiler.libcxx
del self.settings.compiler.cppstd
if self.settings.os == "Macos" and not self.options.iconv:
raise ConanInvalidConfiguration("On macOS iconv can't be disabled")
if self.settings.os == "Linux":
raise ConanInvalidConfiguration("Linux not supported yet")

def requirements(self):
if self.options.get_safe("iconv", False):
Expand Down Expand Up @@ -168,6 +164,10 @@ def _check_dependencies(self):

def validate(self):
self._check_dependencies()
if self.settings.os == "Macos" and not self.options.iconv:
raise ConanInvalidConfiguration("On macOS iconv can't be disabled")
if self.settings.os == "Linux":
raise ConanInvalidConfiguration("Linux not supported yet")

def _configure_cmake(self):
if not self._cmake:
Expand Down

0 comments on commit 70d44e9

Please sign in to comment.