Skip to content

Commit

Permalink
(#25131) [premake] Build with Conan 1.x again
Browse files Browse the repository at this point in the history
* Re-enable Conan 1.x build

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Remove unused import

Signed-off-by: Uilian Ries <uilianries@gmail.com>

---------

Signed-off-by: Uilian Ries <uilianries@gmail.com>
  • Loading branch information
uilianries authored Sep 4, 2024
1 parent a6eed78 commit 1131ace
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
6 changes: 1 addition & 5 deletions recipes/premake/5.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import re
import shutil

from conan import ConanFile, conan_version
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import cross_building
from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get, replace_in_file
Expand Down Expand Up @@ -55,10 +55,6 @@ def requirements(self):
def validate(self):
if hasattr(self, "settings_build") and cross_building(self, skip_x64_x86=True):
raise ConanInvalidConfiguration("Cross-building not implemented")
if conan_version.major == 1 and self.settings.build_type == "Debug":
# This configuration fails without any error messages in C3I.
# https://c3i.jfrog.io/artifactory/misc/logs/pr/18844/15-linux-clang/premake/5.0.0-alpha15/
raise ConanInvalidConfiguration("Debug build not supported with Conan 1.x")

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
Expand Down
8 changes: 3 additions & 5 deletions recipes/premake/5.x/test_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from conan import ConanFile
from conan.tools.cmake import cmake_layout
from conan.tools.build import can_run


class TestPackageConan(ConanFile):
Expand All @@ -10,8 +10,6 @@ class TestPackageConan(ConanFile):
def build_requirements(self):
self.tool_requires(self.tested_reference_str)

def layout(self):
cmake_layout(self)

def test(self):
self.run("premake5 --version")
if can_run(self):
self.run("premake5 --version")

0 comments on commit 1131ace

Please sign in to comment.