diff options
-rw-r--r-- | SConscript | 48 | ||||
-rw-r--r-- | tests/SConscript | 40 | ||||
-rw-r--r-- | tests/framework/SConscript | 36 |
3 files changed, 65 insertions, 59 deletions
diff --git a/SConscript b/SConscript index 069e0906f4..5763f56481 100644 --- a/SConscript +++ b/SConscript @@ -153,29 +153,31 @@ def get_ckw_obj_list(): def build_library(name, build_env, sources, static=False, libs=[]): cloned_build_env = build_env.Clone() - #Set up to use temp file for long command when building and linking libraries - cloned_build_env['TEMPFILE'] = SCons.Platform.TempFileMunge - - #To use temp file for any command, the following pattern should be used: - # env['COMMAND'] = "{$TEMPFILE('$COMMANDSTRING')}" - #See: https://github.com/SCons/scons/blob/05f2992377844bbfec9bcd4a9c7f5479c634b91b/SCons/Platform/__init__.py#L147 - #The commands' string are taken from https://github.com/SCons/scons - #The commands' explanations are taken from Scons userguide - - #The command line used to compile C++ source file to an object file - cloned_build_env['CXXCOM'] = "${TEMPFILE('"+ cloned_build_env['CXXCOM'] + "')}" - #The command line used to compile C++ source file to a shared-library object file - cloned_build_env['SHCXXCOM'] = "${TEMPFILE('"+ cloned_build_env['SHCXXCOM'] + "')}" - #The command line used to generate a static library from object files - cloned_build_env['ARCOM'] = "${TEMPFILE('"+ cloned_build_env['ARCOM'] + "')}" - #The command line used to link object files into an executable - cloned_build_env['LINKCOM'] = "${TEMPFILE('"+ cloned_build_env['LINKCOM'] + "')}" - #The command line used to link programs using shared libraries - cloned_build_env['SHLINKCOM'] = "${TEMPFILE('"+ cloned_build_env['SHLINKCOM'] + "')}" - #The command line used to index a static library archive - cloned_build_env['RANLIBCOM'] = "${TEMPFILE('"+ cloned_build_env['RANLIBCOM'] + "')}" - #Set up directory for temp files. To prevent permission issue, the temp files are in the same directory with output files - cloned_build_env['TEMPFILEDIR'] = cloned_build_env['build_dir'] + #The following set up only works for posix system, RANLIBCOM isn't available on win32 HOST_OS + if cloned_build_env['HOST_OS'] == 'posix': + #Set up to use temp file for long command when building and linking libraries + cloned_build_env['TEMPFILE'] = SCons.Platform.TempFileMunge + + #To use temp file for any command, the following pattern should be used: + # env['COMMAND'] = "{$TEMPFILE('$COMMANDSTRING')}" + #See: https://github.com/SCons/scons/blob/05f2992377844bbfec9bcd4a9c7f5479c634b91b/SCons/Platform/__init__.py#L147 + #The commands' string are taken from https://github.com/SCons/scons + #The commands' explanations are taken from Scons userguide + + #The command line used to compile C++ source file to an object file + cloned_build_env['CXXCOM'] = "${TEMPFILE('"+ cloned_build_env['CXXCOM'] + "')}" + #The command line used to compile C++ source file to a shared-library object file + cloned_build_env['SHCXXCOM'] = "${TEMPFILE('"+ cloned_build_env['SHCXXCOM'] + "')}" + #The command line used to generate a static library from object files + cloned_build_env['ARCOM'] = "${TEMPFILE('"+ cloned_build_env['ARCOM'] + "')}" + #The command line used to link object files into an executable + cloned_build_env['LINKCOM'] = "${TEMPFILE('"+ cloned_build_env['LINKCOM'] + "')}" + #The command line used to link programs using shared libraries + cloned_build_env['SHLINKCOM'] = "${TEMPFILE('"+ cloned_build_env['SHLINKCOM'] + "')}" + #The command line used to index a static library archive + cloned_build_env['RANLIBCOM'] = "${TEMPFILE('"+ cloned_build_env['RANLIBCOM'] + "')}" + #Set up directory for temp files. To prevent permission issue, the temp files are in the same directory with output files + cloned_build_env['TEMPFILEDIR'] = cloned_build_env['build_dir'] if env['os'] == 'android' and static == False: cloned_build_env["LINKFLAGS"].remove('-pie') diff --git a/tests/SConscript b/tests/SConscript index aa5a85a923..fe9d6878e4 100644 --- a/tests/SConscript +++ b/tests/SConscript @@ -188,25 +188,27 @@ if env['fixed_format_kernels'] and test_env['validation_tests']: test_env.Append(CPPDEFINES = ['ARM_COMPUTE_ENABLE_FIXED_FORMAT_KERNELS']) if test_env['validation_tests']: - #Set up to use temp file for long command when building and linking libraries - test_env['TEMPFILE'] = SCons.Platform.TempFileMunge - - #To use temp file for any command, the following pattern should be used: - # env['COMMAND'] = "{$TEMPFILE('$COMMANDSTRING')}" - #See: https://github.com/SCons/scons/blob/05f2992377844bbfec9bcd4a9c7f5479c634b91b/SCons/Platform/__init__.py#L147 - #The commands' string are taken from https://github.com/SCons/scons - #The commands' explanations are taken from Scons userguide - - #The command line used to compile C++ source file to an object files - test_env['CXXCOM'] = "${TEMPFILE('"+ test_env['CXXCOM'] + "')}" - #The command line used to generate a static library from object files - test_env['ARCOM'] = "${TEMPFILE('"+ test_env['ARCOM'] + "')}" - #The command line used to index a static library archive - test_env['RANLIBCOM'] = "${TEMPFILE('"+ test_env['RANLIBCOM'] + "')}" - #The command line used to link object files into an executable - test_env['LINKCOM'] = "${TEMPFILE('"+ test_env['LINKCOM'] + "')}" - #Set up directory for temp files. To prevent permission issue, the temp files are in the same directory with output files - test_env['TEMPFILEDIR'] = test_env['build_dir'] + #The following set up only works for posix system, RANLIBCOM env variable isn't available on win32 HOST_OS + if test_env['HOST_OS'] == 'posix': + #Set up to use temp file for long command when building and linking libraries + test_env['TEMPFILE'] = SCons.Platform.TempFileMunge + + #To use temp file for any command, the following pattern should be used: + # env['COMMAND'] = "{$TEMPFILE('$COMMANDSTRING')}" + #See: https://github.com/SCons/scons/blob/05f2992377844bbfec9bcd4a9c7f5479c634b91b/SCons/Platform/__init__.py#L147 + #The commands' string are taken from https://github.com/SCons/scons + #The commands' explanations are taken from Scons userguide + + #The command line used to compile C++ source file to an object files + test_env['CXXCOM'] = "${TEMPFILE('"+ test_env['CXXCOM'] + "')}" + #The command line used to generate a static library from object files + test_env['ARCOM'] = "${TEMPFILE('"+ test_env['ARCOM'] + "')}" + #The command line used to index a static library archive + test_env['RANLIBCOM'] = "${TEMPFILE('"+ test_env['RANLIBCOM'] + "')}" + #The command line used to link object files into an executable + test_env['LINKCOM'] = "${TEMPFILE('"+ test_env['LINKCOM'] + "')}" + #Set up directory for temp files. To prevent permission issue, the temp files are in the same directory with output files + test_env['TEMPFILEDIR'] = test_env['build_dir'] arm_compute_validation_framework = test_env.StaticLibrary('arm_compute_validation_framework', Glob('validation/reference/*.cpp') + Glob('validation/*.cpp'), LINKFLAGS=test_env['LINKFLAGS'], CXXFLAGS=test_env['CXXFLAGS'], LIBS= [ arm_compute_test_framework ]) Depends(arm_compute_validation_framework , arm_compute_test_framework) diff --git a/tests/framework/SConscript b/tests/framework/SConscript index 65fd5d5b77..cca5169099 100644 --- a/tests/framework/SConscript +++ b/tests/framework/SConscript @@ -75,23 +75,25 @@ if not framework_env['mali']: else: framework_env.Append(CPPDEFINES = ['MALI_ENABLED']) -#Set up to use temp file for long command when building and linking libraries -framework_env['TEMPFILE'] = SCons.Platform.TempFileMunge - -#To use temp file for any command, the following pattern should be used: -# env['COMMAND'] = "{$TEMPFILE('$COMMANDSTRING')}" -#See: https://github.com/SCons/scons/blob/05f2992377844bbfec9bcd4a9c7f5479c634b91b/SCons/Platform/__init__.py#L147 -#The commands' string are taken from https://github.com/SCons/scons -#The commands' explanations are taken from Scons userguide - -#The command line used to compile C++ source file to an object file -framework_env['CXXCOM'] = "${TEMPFILE('"+ framework_env['CXXCOM'] + "')}" -#The command line used to generate a static library from object files -framework_env['ARCOM'] = "${TEMPFILE('"+ framework_env['ARCOM'] + "')}" -#The command line used to index a static library archive -framework_env['RANLIBCOM'] = "${TEMPFILE('"+ framework_env['RANLIBCOM'] + "')}" -#Set up directory for temp files. To prevent permission issue, the temp files are in the same directory with output files -framework_env['TEMPFILEDIR'] = framework_env['build_dir'] +#The following set up only works for posix system, RANLIBCOM env variable isn't available on win32 HOST_OS +if framework_env['HOST_OS'] == 'posix': + #Set up to use temp file for long command when building and linking libraries + framework_env['TEMPFILE'] = SCons.Platform.TempFileMunge + + #To use temp file for any command, the following pattern should be used: + # env['COMMAND'] = "{$TEMPFILE('$COMMANDSTRING')}" + #See: https://github.com/SCons/scons/blob/05f2992377844bbfec9bcd4a9c7f5479c634b91b/SCons/Platform/__init__.py#L147 + #The commands' string are taken from https://github.com/SCons/scons + #The commands' explanations are taken from Scons userguide + + #The command line used to compile C++ source file to an object file + framework_env['CXXCOM'] = "${TEMPFILE('"+ framework_env['CXXCOM'] + "')}" + #The command line used to generate a static library from object files + framework_env['ARCOM'] = "${TEMPFILE('"+ framework_env['ARCOM'] + "')}" + #The command line used to index a static library archive + framework_env['RANLIBCOM'] = "${TEMPFILE('"+ framework_env['RANLIBCOM'] + "')}" + #Set up directory for temp files. To prevent permission issue, the temp files are in the same directory with output files + framework_env['TEMPFILEDIR'] = framework_env['build_dir'] arm_compute_test_framework = framework_env.StaticLibrary('arm_compute_test_framework', files) |