Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
senf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wiback
senf
Commits
51601e44
Commit
51601e44
authored
18 years ago
by
sbund
Browse files
Options
Downloads
Patches
Plain Diff
Fixed library support for SatSCons.StandardBinary
parent
e3884fab
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
satscons/BoostUnitTests.py
+2
-5
2 additions, 5 deletions
satscons/BoostUnitTests.py
satscons/SatSCons.py
+16
-11
16 additions, 11 deletions
satscons/SatSCons.py
with
18 additions
and
16 deletions
satscons/BoostUnitTests.py
+
2
−
5
View file @
51601e44
...
...
@@ -16,11 +16,8 @@ def BoostUnitTests(env, target, source, test_source=None, LIBS = [], DEPENDS = [
testRunner
=
testEnv
.
Program
(
target
,
env
.
Object
(
source
)
+
test_source
)
if
DEPENDS
:
env
.
Depends
(
testRunner
,
DEPENDS
)
test
=
env
.
Command
(
os
.
path
.
join
(
path
,
'
.
'
+
name
+
'
.stamp
'
),
testRunner
,
[
'
./$SOURCE $BOOSSTTESTARGS
'
,
'
touch $TARGET
'
])
env
.
Alias
(
'
all_tests
'
,
test
)
return
env
.
Alias
(
env
.
File
(
'
test
'
),
test
)
return
env
.
Command
(
os
.
path
.
join
(
path
,
'
.
'
+
name
+
'
.stamp
'
),
testRunner
,
[
'
./$SOURCE $BOOSSTTESTARGS
'
,
'
touch $TARGET
'
])
def
dispatcher
(
*
arg
,
**
kw
):
return
BoostUnitTests
(
*
arg
,
**
kw
)
...
...
This diff is collapsed.
Click to expand it.
satscons/SatSCons.py
+
16
−
11
View file @
51601e44
...
...
@@ -3,8 +3,6 @@ import os.path, SCons.Options, SCons.Environment, SCons.Script.SConscript, glob
opts
=
None
finalizers
=
[]
testTargets
=
[]
def
InitOpts
():
global
opts
if
opts
is
not
None
:
return
...
...
@@ -92,7 +90,6 @@ def StandardTargets(env):
#env.AlwaysBuild(env.Command('ChangeLog', '', [ "cvs2cl -rS --no-wrap --summary" ]))
def
StandardObjects
(
env
,
sources
,
testSources
=
None
,
LIBS
=
[]):
global
testTargets
if
type
(
sources
)
==
type
(()):
testSources
=
sources
[
1
]
sources
=
sources
[
0
]
...
...
@@ -101,19 +98,21 @@ def StandardObjects(env, sources, testSources = None, LIBS = []):
objects
=
env
.
Object
(
sources
)
LOCAL_LIBS
=
[
x
for
x
in
LIBS
if
x
.
startswith
(
'
$LIB_
'
)
]
LIBS
=
[
x
for
x
in
LIBS
if
x
not
in
LOCAL_LIBS
]
if
testSources
:
testTargets
.
append
(
env
.
BoostUnitTests
(
LOCAL_LIBS
=
[
x
for
x
in
LIBS
if
x
.
startswith
(
'
$LIB_
'
)
]
LIBS
=
[
x
for
x
in
LIBS
if
x
not
in
LOCAL_LIBS
]
test
=
env
.
BoostUnitTests
(
target
=
'
test_runner
'
,
source
=
sources
,
test_source
=
testSources
+
LOCAL_LIBS
,
LIBS
=
LIBS
,
DEPENDS
=
LOCAL_LIBS
))
DEPENDS
=
LOCAL_LIBS
)
env
.
Alias
(
'
all_tests
'
,
test
)
env
.
Alias
(
env
.
File
(
'
test
'
),
test
)
env
.
Doxygen
(
target
=
'
doc
'
,
source
=
sources
)
#
env.Doxygen(
#
target = 'doc',
#
source = sources )
return
objects
...
...
@@ -122,10 +121,16 @@ def StandardLib(env, library, sources, testSources = None, LIBS = []):
lib
=
env
.
Library
(
library
,
objects
)
env
.
Default
(
lib
)
env
.
Append
(
**
{
'
LIB_
'
+
library
:
lib
})
env
.
Append
(
LIB_ALL
=
lib
)
return
lib
def
StandardBinary
(
env
,
binary
,
sources
,
testSources
=
None
,
LIBS
=
[]):
objects
=
StandardObjects
(
env
,
sources
,
testSources
,
LIBS
=
LIBS
)
program
=
env
.
Program
(
binary
,
objects
)
LOCAL_LIBS
=
[
x
for
x
in
LIBS
if
x
.
startswith
(
'
$LIB_
'
)
]
LIBS
=
[
x
for
x
in
LIBS
if
x
not
in
LOCAL_LIBS
]
progEnv
=
env
.
Copy
()
progEnv
.
Append
(
LIBS
=
LIBS
)
program
=
progEnv
.
Program
(
target
=
binary
,
source
=
objects
+
LOCAL_LIBS
)
env
.
Default
(
program
)
env
.
Depends
(
program
,
LOCAL_LIBS
)
return
program
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment