OSX/scons: make MACOSX_SDK_CHECK a local var is sconstruct and remove from env, also...
authorJens Verwiebe <info@jensverwiebe.de>
Fri, 8 Nov 2013 13:44:10 +0000 (13:44 +0000)
committerJens Verwiebe <info@jensverwiebe.de>
Fri, 8 Nov 2013 13:44:10 +0000 (13:44 +0000)
SConstruct
build_files/scons/tools/btools.py
extern/libmv/third_party/ceres/SConscript
extern/libmv/third_party/ceres/bundle.sh

index 92f7d9476627bbfb8dfa0d9aad5ca8b720b24326..4a08b691e077d80469d670038d1195be5f8bf2db 100644 (file)
@@ -293,7 +293,7 @@ if 'cudakernels' in B.targets:
 if env['OURPLATFORM']=='darwin':
 
     import commands
-    
+
     cmd = 'sw_vers -productVersion'
     MAC_CUR_VER=cmd_res=commands.getoutput(cmd)
     cmd = 'xcodebuild -version'
@@ -301,7 +301,7 @@ if env['OURPLATFORM']=='darwin':
     env['XCODE_CUR_VER']=cmd_xcode[6:][:3] # truncate output to major.minor version
     cmd = 'xcodebuild -showsdks'
     cmd_sdk=commands.getoutput(cmd)
-    env['MACOSX_SDK_CHECK']=cmd_sdk
+    MACOSX_SDK_CHECK=cmd_sdk
     cmd = 'xcode-select --print-path'
     XCODE_SELECT_PATH=commands.getoutput(cmd)
     if XCODE_SELECT_PATH.endswith("/Contents/Developer"):
@@ -310,22 +310,22 @@ if env['OURPLATFORM']=='darwin':
         XCODE_BUNDLE=XCODE_SELECT_PATH
 
     print B.bc.OKGREEN + "Detected Xcode version: -- " + B.bc.ENDC + env['XCODE_CUR_VER'] + " --"
-    print "Available " + env['MACOSX_SDK_CHECK']
+    print "Available " + MACOSX_SDK_CHECK
 
     if env['MACOSX_SDK'] == '': # no set sdk, choosing best one found
-        if 'OS X 10.9' in env['MACOSX_SDK_CHECK']:
+        if 'OS X 10.9' in MACOSX_SDK_CHECK:
             env['MACOSX_DEPLOYMENT_TARGET'] = '10.6'
             env['MACOSX_SDK']='/Developer/SDKs/MacOSX10.9.sdk'
-        elif 'OS X 10.8' in env['MACOSX_SDK_CHECK']:
+        elif 'OS X 10.8' in MACOSX_SDK_CHECK:
             env['MACOSX_DEPLOYMENT_TARGET'] = '10.6'
             env['MACOSX_SDK']='/Developer/SDKs/MacOSX10.8.sdk'
-        elif 'OS X 10.7' in env['MACOSX_SDK_CHECK']:
+        elif 'OS X 10.7' in MACOSX_SDK_CHECK:
             env['MACOSX_DEPLOYMENT_TARGET'] = '10.6'
             env['MACOSX_SDK']='/Developer/SDKs/MacOSX10.7.sdk'
-        elif 'OS X 10.6' in env['MACOSX_SDK_CHECK']:
+        elif 'OS X 10.6' in MACOSX_SDK_CHECK:
             env['MACOSX_DEPLOYMENT_TARGET'] = '10.6'
             env['MACOSX_SDK']='/Developer/SDKs/MacOSX10.6.sdk'
-        elif 'OS X 10.5' in env['MACOSX_SDK_CHECK']:
+        elif 'OS X 10.5' in MACOSX_SDK_CHECK:
             env['MACOSX_DEPLOYMENT_TARGET'] = '10.5'
             env['MACOSX_SDK']='/Developer/SDKs/MacOSX10.5.sdk'
     else:
index c542435fb471094e1cfbdc3194d670340b30e7ba..607b761261c2f42a6b0c425fc2775d3a68227add 100644 (file)
@@ -179,7 +179,7 @@ def validate_arguments(args, bc):
             'BF_PROFILE_CFLAGS', 'BF_PROFILE_CCFLAGS', 'BF_PROFILE_CXXFLAGS', 'BF_PROFILE_LINKFLAGS',
             'BF_DEBUG_CFLAGS', 'BF_DEBUG_CCFLAGS', 'BF_DEBUG_CXXFLAGS',
             'C_WARN', 'CC_WARN', 'CXX_WARN',
-            'LLIBS', 'PLATFORM_LINKFLAGS', 'MACOSX_ARCHITECTURE', 'MACOSX_SDK', 'MACOSX_SDK_CHECK', 'XCODE_CUR_VER',
+            'LLIBS', 'PLATFORM_LINKFLAGS', 'MACOSX_ARCHITECTURE', 'MACOSX_SDK', 'XCODE_CUR_VER',
             'BF_CYCLES_CUDA_BINARIES_ARCH', 'BF_PROGRAM_LINKFLAGS', 'MACOSX_DEPLOYMENT_TARGET'
     ]
 
@@ -502,7 +502,6 @@ def read_opts(env, cfg, args):
         ('PLATFORM_LINKFLAGS', 'Platform linkflags', []),
         ('MACOSX_ARCHITECTURE', 'python_arch.zip select', ''),
         ('MACOSX_SDK', 'Set OS X SDK', ''),
-        ('MACOSX_SDK_CHECK', 'Detect available OS X SDK`s', ''),
         ('XCODE_CUR_VER', 'Detect XCode version', ''),
         ('MACOSX_DEPLOYMENT_TARGET', 'Detect OS X target version', ''),
 
index a914135fddc388507984a8de60bd338623af14f5..164aedfe415d282550909e49b86b9db3333f77de 100644 (file)
@@ -28,7 +28,7 @@ defs.append('CERES_HAVE_RWLOCK')
 if env['WITH_BF_OPENMP']:
     defs.append('CERES_USE_OPENMP')
 
-if 'Mac OS X 10.5' in env['MACOSX_SDK_CHECK']:
+if 'Mac OS X 10.5' in env['MACOSX_SDK']:
     defs.append('CERES_NO_TR1')
 
 incs = '. ../../ ../../../Eigen3 ./include ./internal ../gflags'
index 6ab348af11875dd05fab9d2cdcf3bf85ddb62a76..a6f040b6d2967d2cc8c9772cb3a43aebb7a930d4 100755 (executable)
@@ -225,7 +225,7 @@ defs.append('CERES_HAVE_RWLOCK')
 if env['WITH_BF_OPENMP']:
     defs.append('CERES_USE_OPENMP')
 
-if 'Mac OS X 10.5' in env['MACOSX_SDK_CHECK']:
+if 'Mac OS X 10.5' in env['MACOSX_SDK']:
     defs.append('CERES_NO_TR1')
 
 incs = '. ../../ ../../../Eigen3 ./include ./internal ../gflags'