yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #08263
[Branch ~yade-dev/yade/trunk] Rev 3008: Add eigen2-option into scons to force compiling with eigen2.
------------------------------------------------------------
revno: 3008
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
branch nick: yade
timestamp: Mon 2012-01-30 20:52:10 +0100
message:
Add eigen2-option into scons to force compiling with eigen2.
modified:
SConstruct
--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription
=== modified file 'SConstruct'
--- SConstruct 2011-11-24 17:49:01 +0000
+++ SConstruct 2012-01-30 19:52:10 +0000
@@ -115,6 +115,7 @@
('SHCCFLAGS','Additional compiler flags for linking (for plugins).',None,None,Split),
BoolVariable('QUAD_PRECISION','typedef Real as long double (=quad)',0),
BoolVariable('brief',"Don't show commands being run, only what files are being compiled/linked/installed",True),
+ BoolVariable('eigen2',"Force to use eigen2, if even eigen3 persists in the system.",False),
)
opts.Update(env)
@@ -136,12 +137,14 @@
z+=1
#Check, is there eigen3 directory, if not - use eigen2
-if os.path.exists('/usr/include/eigen3'):
+if os.path.exists('/usr/include/eigen3') and not (env['eigen2']):
print "Eigen 3 math library will be used"
env.Append(CPPPATH=":/usr/include/eigen3")
-else:
+elif os.path.exists('/usr/include/eigen2') and (env['eigen2']):
print "Eigen 2 math library will be used"
env.Append(CPPPATH=":/usr/include/eigen2")
+else:
+ raise RuntimeError("None of mathematical libraries (eigen2 or eigen3) can be used.")
if saveProfile: opts.Save(optsFile,env)
# fix expansion in python substitution by assigning the right value if not specified