diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/operating_systems/mac_os.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/spack/spack/operating_systems/mac_os.py b/lib/spack/spack/operating_systems/mac_os.py index f8259ff301..a95640ec8a 100644 --- a/lib/spack/spack/operating_systems/mac_os.py +++ b/lib/spack/spack/operating_systems/mac_os.py @@ -7,6 +7,7 @@ import platform as py_platform from spack.architecture import OperatingSystem from spack.version import Version +from spack.util.executable import Executable # FIXME: store versions inside OperatingSystem as a Version instead of string @@ -16,6 +17,13 @@ def macos_version(): return Version('.'.join(py_platform.mac_ver()[0].split('.')[:2])) +def macos_sdk_path(): + """Return SDK path + """ + xcrun = Executable('xcrun') + return xcrun('--show-sdk-path', output=str, error=str).rstrip() + + class MacOs(OperatingSystem): """This class represents the macOS operating system. This will be auto detected using the python platform.mac_ver. The macOS |