Skip to content

Instantly share code, notes, and snippets.

@rowanj
Created November 12, 2012 11:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rowanj/4058776 to your computer and use it in GitHub Desktop.
Save rowanj/4058776 to your computer and use it in GitHub Desktop.
user-config.jam for targeting iOS with Boost.Build and Clang
local xcCLANG = [ SHELL "xcrun -sdk iphoneos -f clang" ] ;
local CLANG = [ MATCH "([^
]*)" : $(xcCLANG) ] ;
ECHO "CLANG = $(CLANG)" ;
local xcDEVDIR = [ SHELL "xcode-select --print-path" ] ;
local DEVDIR = [ MATCH "([^
]*)" : $(xcDEVDIR) ] ;
ECHO "DEVDIR = $(DEVDIR)" ;
local EXTRA_CXX_FLAGS = "-g -fvisibility=hidden -fvisibility-inlines-hidden" ;
local IPHONE_CXX_FLAGS = "-miphoneos-version-min=5.0" ;
local IOS_SIMULATOR_CXX_FLAGS = "-mios-simulator-version-min=5.0" ;
using darwin :
: $(CLANG)
: <cxxflags>$(EXTRA_CXX_FLAGS)
;
using darwin : 6.0~iphone
: $(CLANG) -arch armv6 -arch armv7 -arch armv7s
: <cxxflags>$(IPHONE_CXX_FLAGS) <root>$(DEVDIR)/Platforms/iPhoneOS.platform/Developer <macosx-version>iphone-6.0 <target-os>iphone
;
using darwin : 6.0~iphonesim
: $(CLANG) -arch i386
: <cxxflags>$(IOS_SIMULATOR_CXX_FLAGS) <root>$(DEVDIR)/Platforms/iPhoneSimulator.platform/Developer <macosx-version>iphonesim-6.0 <target-os>iphone
;
@jmowla
Copy link

jmowla commented Jul 20, 2014

I want to build an iPhone app by using Boost.Build, I mean I just wanted to issue some "b2..." command and Boost.Build makes a final executable version for iPhone instead of making boost.framework and add that into Xcode project!
Have you ever tried this way?
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment