forked from DLR-SC/tasking-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '1-make-scons-build-great-again' into 'master'
Resolve "make scons build great again" Closes #1 See merge request softwarecenter/tasking-framework!1
- Loading branch information
Showing
8 changed files
with
123 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
[submodule "contrib/scons-build-tools"] | ||
path = contrib/scons-build-tools | ||
url = [email protected]:softwarecenter/scons-build-tools.git | ||
[submodule "contrib/googletest-fused"] | ||
path = contrib/googletest-fused | ||
url = [email protected]:softwarecenter/googletest-fused.git | ||
[submodule "contrib/outpost-core"] | ||
path = contrib/outpost-core | ||
url = [email protected]:DLR-RY/outpost-core.git | ||
branch = master | ||
url = [email protected]:pengting/outpost-core.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env python | ||
|
||
import os | ||
|
||
Import('envGlobal') | ||
|
||
envGlobal.Append(CPPPATH=[os.path.abspath('.') ]) | ||
|
||
# Build GoogleTest | ||
googletest = os.path.join(envGlobal['BASEPATH'], 'contrib/googletest-fused') | ||
envGlobal.Append(CPPPATH=[ | ||
#os.path.abspath('%s' % googletest), | ||
googletest, | ||
]) | ||
|
||
env = envGlobal.Clone() | ||
env['CXXFLAGS_language'] = ['-std=c++98'] | ||
|
||
env.RemoveFromList('CCFLAGS_warning', [ | ||
'-Wconversion', | ||
'-Wundef', | ||
'-Wmissing-declarations']) | ||
env.RemoveFromList('CXXFLAGS_warning', '-Wold-style-cast') | ||
|
||
files = env.Glob('%s/*.cc' % googletest) | ||
objects = [] | ||
for file in files: | ||
objects.append(env.Object(file)) | ||
envGlobal.Append(objects={'googletest': objects}) | ||
|
||
libraryGmock = env.StaticLibrary('gtest', objects) | ||
envGlobal.Install('$BUILDPATH/lib', libraryGmock) | ||
envGlobal.Append(LIBS=['gtest']) | ||
|
||
#SConscript( | ||
# os.path.join(envGlobal['BASEPATH'], 'contrib/outpost-core/modules/SConscript.library'), | ||
# exports='envGlobal') | ||
|
||
SConscript( | ||
os.path.join(envGlobal['BASEPATH'], 'src/SConscript'), | ||
exports='envGlobal') | ||
|
||
SConscript( | ||
os.path.join(envGlobal['BASEPATH'], 'test/SConscript'), | ||
exports='envGlobal') | ||
|
||
env = envGlobal.Clone() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/usr/bin/env python | ||
|
||
import os | ||
|
||
vars = Variables('custom.py') | ||
vars.Add(BoolVariable('coverage', 'Set to build for coverage analysis', 0)) | ||
vars.Add('append_buildpath', 'manual append to buildpath', '') | ||
|
||
## Define project paths -------------------------------------------------------- | ||
root_path = os.path.abspath('.') | ||
outpost_path = [os.path.join(root_path, 'contrib/outpost-core')] | ||
print(outpost_path) | ||
build_path = os.path.join(root_path, 'build') | ||
|
||
envGlobal = Environment( | ||
CXXFLAGS=["-std=c++11", "--debug"], | ||
toolpath=[os.path.join(root_path, 'contrib/scons-build-tools/site_tools')], | ||
tools=['compiler_hosted_gcc', | ||
'settings_buildpath', | ||
'utils_buildformat', | ||
'utils_buildsize'], | ||
variables=vars, | ||
BASEPATH=os.path.abspath('.'), | ||
OS='posix', | ||
PLATFORM='outpost', | ||
GTEST_SUPPORT_NEEDED='no', | ||
ENV=os.environ) | ||
print(envGlobal['OS']) | ||
print(envGlobal['toolpath']) | ||
|
||
Help(vars.GenerateHelpText(envGlobal)) | ||
|
||
buildfolder = os.path.join(root_path, 'build') | ||
|
||
if envGlobal['coverage']: | ||
envGlobal.Tool('compiler_hosted_gcc_coverage') | ||
envGlobal.Tool('settings_buildpath') | ||
envGlobal['BUILDPATH'] = os.path.abspath(os.path.join(buildfolder, module, 'test/coverage')) | ||
else: | ||
envGlobal.Tool('compiler_hosted_gcc') | ||
envGlobal.Tool('settings_buildpath') | ||
envGlobal['BUILDPATH'] = os.path.abspath(os.path.join(buildfolder, 'test/unittest')) | ||
|
||
if envGlobal['append_buildpath']: | ||
envGlobal['BUILDPATH'] = os.path.abspath(os.path.join(buildfolder, envGlobal['append_buildpath'] + '/' )) | ||
|
||
envGlobal['BASEPATH'] = root_path | ||
envGlobal['ROOTPATH'] = root_path | ||
envGlobal['IPCPATH'] = root_path | ||
#envGlobal['BUILDPATH'] = os.path.join(build_path, variant_dir) | ||
envGlobal['BUILDPATH'] = build_path | ||
envGlobal['BINPATH'] = os.path.join(envGlobal['BUILDPATH'], 'bin') | ||
envGlobal['LIBINSTALLPATH'] = os.path.join(envGlobal['BUILDPATH'], 'lib') | ||
envGlobal['LIBPATH'] = envGlobal['LIBINSTALLPATH'] | ||
|
||
subSConscripts = [ | ||
'contrib/outpost-core/modules/SConscript.library', | ||
'SConscript', | ||
] | ||
for subSConscript in subSConscripts: | ||
SConscript(subSConscript, exports='envGlobal', duplicate = 0) | ||
|
||
env = envGlobal.Clone() |
Submodule googletest-fused
added at
850ecc
Submodule outpost-core
updated
from 7ed81a to fd307e
Submodule scons-build-tools
added at
06d970
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters