Skip to content

Commit

Permalink
add compilation flag_LIBCPP_DISABLE_AVAILABILITY=1 to allow use of st…
Browse files Browse the repository at this point in the history
…d::variant/filesystem on pre 10.13 or 10.15 macos deployment platforms
  • Loading branch information
Matthias Wittgen committed Apr 29, 2021
1 parent 34d2233 commit f66cd1e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/lsst/sconsUtils/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@ def _initEnvironment():
# We want to be explicit about the OS X version we're targeting
#
env['ENV']['MACOSX_DEPLOYMENT_TARGET'] = env['macosx_deployment_target']
# This flag is required for std::variant and std::filesystem
# on deployment platforms < 10.13 and 10.15
for flag in ("-D_LIBCPP_DISABLE_AVAILABILITY=1", ):
env["CFLAGS"].append(flag)
env["CXXFLAGS"].append(flag)
log.info("Setting OS X binary compatibility level: %s" % env['ENV']['MACOSX_DEPLOYMENT_TARGET'])
#
# For XCode 7.3 we need to explicitly add a trailing slash to library
Expand Down

0 comments on commit f66cd1e

Please sign in to comment.