Skip to content

Commit

Permalink
Boost: Treat empty CXX, AR, RANLIB env as undefined
Browse files Browse the repository at this point in the history
Fixes Issue #5569

A bug in cmake-gui would have it sometimes set CXX to
empty instead of leaving it undefined.  CXX detection
in the boost recipe would use the blank value and fail
to build.  Now we treat empty the same as undefined
and move on to e.g. xcrun detection for these properties.
  • Loading branch information
jakecobb committed May 25, 2021
1 parent dcb9a88 commit 8a27ce8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions recipes/boost/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1044,23 +1044,23 @@ def _build_cross_flags(self):

@property
def _ar(self):
if "AR" in os.environ:
if os.environ.get("AR"):
return os.environ["AR"]
if tools.is_apple_os(self.settings.os) and self.settings.compiler == "apple-clang":
return tools.XCRun(self.settings).ar
return None

@property
def _ranlib(self):
if "RANLIB" in os.environ:
if os.environ.get("RANLIB"):
return os.environ["RANLIB"]
if tools.is_apple_os(self.settings.os) and self.settings.compiler == "apple-clang":
return tools.XCRun(self.settings).ranlib
return None

@property
def _cxx(self):
if "CXX" in os.environ:
if os.environ.get("CXX"):
return os.environ["CXX"]
if tools.is_apple_os(self.settings.os) and self.settings.compiler == "apple-clang":
return tools.XCRun(self.settings).cxx
Expand Down

0 comments on commit 8a27ce8

Please sign in to comment.