Skip to content
Snippets Groups Projects
Commit 916f9af2 authored by Paul Oppenheim's avatar Paul Oppenheim
Browse files

"mac cmake build should not be universal by default" changes. Reviewed by bos.

parent f540a705
No related branches found
No related tags found
No related merge requests found
......@@ -52,11 +52,22 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(DARWIN 1)
set(ARCH universal)
# set this dynamically from the build system now -
# NOTE: wont have a distributable build unless you add this on the configure line with:
# -DCMAKE_OSX_ARCHITECTURES:STRING='i386;ppc'
#set(CMAKE_OSX_ARCHITECTURES i386;ppc)
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.4u.sdk)
if (CMAKE_OSX_ARCHITECTURES MATCHES "i386" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc")
set(ARCH universal)
else (CMAKE_OSX_ARCHITECTURES MATCHES "i386" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc")
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc")
set(ARCH ppc)
else (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc")
set(ARCH i386)
endif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc")
endif (CMAKE_OSX_ARCHITECTURES MATCHES "i386" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc")
set(LL_ARCH ${ARCH}_darwin)
set(LL_ARCH_DIR ${ARCH}-darwin)
set(CMAKE_OSX_ARCHITECTURES i386;ppc)
set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.4u.sdk)
endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
......
......@@ -208,12 +208,14 @@ def os(self):
def arch(self):
cpu = os.uname()[-1]
if cpu.endswith('86'):
if cpu.endswith('386'):
cpu = 'i386'
elif cpu.endswith('86'):
cpu = 'i686'
elif cpu in ('athlon',):
cpu = 'i686'
elif cpu == 'Power Macintosh':
cpu = 'powerpc'
cpu = 'ppc'
return cpu
......@@ -361,26 +363,31 @@ def os(self):
return 'darwin'
def arch(self):
return 'universal'
if self.unattended == 'TRUE':
return 'universal'
else:
return UnixSetup.arch(self)
def cmake_commandline(self, src_dir, build_dir, opts, simple):
arches = ''
args = dict(
arches=arches,
dir=src_dir,
generator=self.generator,
opts=quote(opts),
standalone=self.standalone,
unattended=self.unattended,
universal='',
type=self.build_type.upper()
)
if self.unattended == 'TRUE':
args['universal'] = '-DCMAKE_OSX_ARCHITECTURES:STRING=\'i386;ppc\''
#if simple:
# return 'cmake %(opts)s %(dir)r' % args
return ('cmake -G %(generator)r '
'-DCMAKE_BUILD_TYPE:STRING=%(type)s '
'-DSTANDALONE:BOOL=%(standalone)s '
'-DUNATTENDED:BOOL=%(unattended)s '
'%(arches)s %(opts)s %(dir)r' % args)
'%(universal)s '
'%(opts)s %(dir)r' % args)
def run_build(self, opts, targets):
cwd = os.getcwd()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment