Skip to content

Commit

Permalink
FreeBSD support, part 2 (conan-io#753)
Browse files Browse the repository at this point in the history
* FreeBSD minimal support

* fixed tests for FreeBSD

* Issue conan-io#742: Fix default compiler on FreeBSD. Add FreeBSD to default accepted os in unit tests.
  • Loading branch information
mropert authored and lasote committed Dec 13, 2016
1 parent 668ea17 commit 675c095
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion conans/client/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,13 @@ def _detect_compiler_version(result, output):
result.append(("compiler.runtime", "MD"))
elif compiler == "apple-clang":
result.append(("compiler.libcxx", "libc++"))
elif compiler == "gcc" or "clang" in compiler:
elif compiler == "gcc" in compiler:
result.append(("compiler.libcxx", "libstdc++"))
elif compiler == "clang" in compiler:
if platform.system() == "FreeBSD":
result.append(("compiler.libcxx", "libc++"))
else:
result.append(("compiler.libcxx", "libstdc++"))


def detected_os():
Expand Down
2 changes: 1 addition & 1 deletion conans/test/model/other_settings_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def invalid_settings_test2(self):
class SayConan(ConanFile):
name = "Say"
version = "0.1"
settings = {"os": ["Windows", "Linux", "Macos"], "compiler": ["Visual Studio"]}
settings = {"os": ["Windows", "Linux", "Macos", "FreeBSD"], "compiler": ["Visual Studio"]}
"""

self.client.save({CONANFILE: content})
Expand Down
2 changes: 1 addition & 1 deletion conans/test/model/settings_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def remove_os_test(self):
self.assertEqual(self.sut.os, "Linux")

def loads_default_test(self):
settings = Settings.loads("""os: [Windows, Linux, Macos, Android]
settings = Settings.loads("""os: [Windows, Linux, Macos, Android, FreeBSD]
arch: [x86, x86_64, arm]
compiler:
gcc:
Expand Down
2 changes: 1 addition & 1 deletion conans/test/update_settings_yml_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def build(self):
self.output.warn("Building...")
'''
prev_settings = """
os: [Windows, Linux, Macos, Android]
os: [Windows, Linux, Macos, Android, FreeBSD]
arch: [x86, x86_64, armv6, armv7, armv7hf, armv8]
compiler:
gcc:
Expand Down

0 comments on commit 675c095

Please sign in to comment.