yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #10904
[Branch ~yade-pkg/yade/git-trunk] Rev 3990: Replace features by CONFIGURED_FEATS.
------------------------------------------------------------
revno: 3990
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Tue 2014-05-27 13:24:16 +0200
message:
Replace features by CONFIGURED_FEATS.
Remove duplicating variables.
modified:
CMakeLists.txt
core/main/main.py.in
core/main/yade-batch.in
doc/sphinx/prog.rst
py/config.py.in
--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2014-05-26 08:10:59 +0000
+++ CMakeLists.txt 2014-05-27 11:24:16 +0000
@@ -157,7 +157,6 @@
INCLUDE_DIRECTORIES(${VTK_INCLUDE_DIRS})
LINK_DIRECTORIES( ${VTK_LIBRARY_DIRS} )
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DYADE_VTK")
- SET(features "${features} vtk")
MESSAGE(STATUS "Found VTK")
SET(CONFIGURED_FEATS "${CONFIGURED_FEATS} VTK")
ELSE(VTK_FOUND)
@@ -175,7 +174,6 @@
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DYADE_OPENMP ${OpenMP_CXX_FLAGS}")
MESSAGE(STATUS "Found OpenMP")
SET(CONFIGURED_FEATS "${CONFIGURED_FEATS} OpenMP")
- SET(features "${features} openmp")
ELSE(OPENMP_FOUND)
MESSAGE(STATUS "OpenMP NOT found")
SET(ENABLE_OPENMP OFF)
@@ -195,7 +193,6 @@
INCLUDE_DIRECTORIES(${GLIB2_INCLUDE_DIRS})
MESSAGE(STATUS "Found GTS")
SET(CONFIGURED_FEATS "${CONFIGURED_FEATS} GTS")
- SET(features "${features} gts")
ELSE(GTS_FOUND AND GLIB2_FOUND)
MESSAGE(STATUS "GTS NOT found")
SET(DISABLED_FEATS "${DISABLED_FEATS} GTS")
@@ -214,7 +211,6 @@
IF(QT4_FOUND AND OPENGL_FOUND AND GLUT_FOUND AND GLIB2_FOUND AND QGLVIEWER_FOUND)
SET(GUI_LIBS ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${QGLVIEWER_LIBRARIES})
SET(GUI_SRC_LIB "lib/opengl/GLUtils.cpp")
- SET(features "${features} qt4 opengl")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DYADE_OPENGL")
INCLUDE_DIRECTORIES(${GLIB2_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${QT_INCLUDES})
@@ -255,7 +251,7 @@
IF(ENABLE_PFVFLOW)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DFLOW_ENGINE")
- SET(CONFIGURED_FEATS "${CONFIGURED_FEATS} PFVflow")
+ SET(CONFIGURED_FEATS "${CONFIGURED_FEATS} PFVflow")
ELSE(ENABLE_PFVFLOW)
SET(DISABLED_FEATS "${DISABLED_FEATS} PFVflow")
ENDIF(ENABLE_PFVFLOW)
=== modified file 'core/main/main.py.in'
--- core/main/main.py.in 2014-02-03 16:10:20 +0000
+++ core/main/main.py.in 2014-05-27 11:24:16 +0000
@@ -18,7 +18,7 @@
# get yade path (allow YADE_PREFIX to override)
prefix,suffix='${runtimePREFIX}' if not os.environ.has_key('YADE_PREFIX') else os.environ['YADE_PREFIX'],'${SUFFIX}'
# duplicate some items from yade.config here, so that we can increase verbosity when the c++ part is booting
-features,version,debugbuild='${features}'.split(' '),'${realVersion}',' ${debugbuild}'
+features,version,debugbuild='${CONFIGURED_FEATS}'.split(' '),'${realVersion}',' ${debugbuild}'
libPATH='${LIBRARY_OUTPUT_PATH}'
if (libPATH[1:] == '{LIBRARY_OUTPUT_PATH}'): libPATH='lib'
@@ -101,7 +101,7 @@
print 20*'*'+' SOME TESTS FAILED '+20*'*'
sys.exit(1)
-if not 'openmp' in features and (opts.cores or (opts.threads and opts.threads>1)):
+if not 'OpenMP' in features and (opts.cores or (opts.threads and opts.threads>1)):
print 'WARNING: compiled without OpenMP, -j/--threads/--cores have no effect.'
# OpenMP env variables must be set before loading yade libs ("import yade" below)
@@ -240,7 +240,7 @@
## run userSession in a way corresponding to the features we use:
gui=None
yade.runtime.hasDisplay=False # this is the default initialized in the module, anyway
-if 'qt4' in features: gui='qt4'
+if 'GUI' in features: gui='qt4'
if opts.nogui: gui=None
if gui:
import Xlib.display
=== modified file 'core/main/yade-batch.in'
--- core/main/yade-batch.in 2013-12-20 15:10:54 +0000
+++ core/main/yade-batch.in 2014-05-27 11:24:16 +0000
@@ -343,8 +343,8 @@
if os.environ.has_key("OMP_NUM_THREADS"): return min(int(os.environ['OMP_NUM_THREADS']),nCpu)
return nCpu
numCores=getNumCores()
-maxOmpThreads=numCores if 'openmp' in yade.config.features else 1
-features,version='${features}'.split(','),'${realVersion}'
+maxOmpThreads=numCores if 'OpenMP' in yade.config.features else 1
+features,version='${CONFIGURED_FEATS}'.split(','),'${realVersion}'
prog = os.path.basename(sys.argv[0])
parser=argparse.ArgumentParser(usage='%s [options] [ TABLE [SIMULATION.py] | SIMULATION.py[/nCores] [...] ]'%prog,description='%s runs yade simulation multiple times with different parameters.\n\nSee https://yade-dem.org/sphinx/user.html#batch-queuing-and-execution-yade-batch for details.\n\nBatch can be specified either with parameter table TABLE (must not end in .py), which is either followed by exactly one SIMULATION.py (must end in .py), or contains !SCRIPT column specifying the simulation to be run. The second option is to specify multiple scripts, which can optionally have /nCores suffix to specify number of cores for that particular simulation (corresponds to !THREADS column in the parameter table), e.g. sim.py/3.'%prog)
@@ -473,7 +473,7 @@
nCores=maxJobs
else:
logging.warning('WARNING: job #%d will use %d cores but only %d are available'%(i,nCores,maxJobs))
- if 'openmp' not in yade.config.features and nCores>1:
+ if 'OpenMP' not in yade.config.features and nCores>1:
logging.warning('Job #%d will be uselessly run with %d threads (compiled without OpenMP support).'%(i,nCores))
executables.add(jobExecutable)
# compose command-line: build the hyper-linked variant, then strip HTML tags (ugly, but ensures consistency)
=== modified file 'doc/sphinx/prog.rst'
--- doc/sphinx/prog.rst 2013-09-12 06:56:25 +0000
+++ doc/sphinx/prog.rst 2014-05-27 11:24:16 +0000
@@ -62,7 +62,7 @@
YADE_REQUIRE_FEATURE(vtk);
YADE_REQUIRE_FEATURE(gts);
-This file will be compiled only if *both* ``vtk`` and ``gts`` features are enabled.
+This file will be compiled only if *both* ``VTK`` and ``GTS`` features are enabled.
Depending on current feature set, only selection of plugins will be compiled.
It is possible to disable compilation of a file by requiring any non-existent feature, such as::
=== modified file 'py/config.py.in'
--- py/config.py.in 2014-02-28 08:22:32 +0000
+++ py/config.py.in 2014-05-27 11:24:16 +0000
@@ -14,7 +14,7 @@
libDir=os.path.abspath(prefix+'/'+libPATH+'/yade${SUFFIX}')
confDir=os.environ['HOME']+'/.yade${SUFFIX}'
libstdcxx='${libstdcxx}'
-features='${features}'.split(' ')
+features='${CONFIGURED_FEATS}'.split(' ')
revision='${realVersion}'
version='${version}'
sourceRoot='${sourceRoot}'