Added an option for MacPorts in ccb.py (for Boost pathes).
This commit is contained in:
parent
f68ac4d0e6
commit
81b86e7daf
|
@ -35,6 +35,8 @@ class Builder:
|
|||
self._noCache = False
|
||||
self._ninja = False
|
||||
self._clang = False
|
||||
self._noSystemBoost = False
|
||||
self._macports = False
|
||||
self._devtoolset2 = False
|
||||
self._qt5 = False
|
||||
self._openmp = False
|
||||
|
@ -61,7 +63,12 @@ class Builder:
|
|||
elif attribute == "noCache": self._noCache = value
|
||||
elif attribute == "ninja": self._ninja = value
|
||||
elif attribute == "clang": self._clang = value
|
||||
elif attribute == "devtoolset2": self._devtoolset2 = value
|
||||
elif attribute == "macports":
|
||||
self._macports = value
|
||||
if value: self._noSystemBoost = True
|
||||
elif attribute == "devtoolset2":
|
||||
self._devtoolset2 = value
|
||||
if value: self._noSystemBoost = True
|
||||
elif attribute == "qt5": self._qt5 = value
|
||||
elif attribute == "openmp": self._openmp = value
|
||||
elif attribute == "enableDoc": self._enableDoc = value
|
||||
|
@ -166,10 +173,10 @@ class Builder:
|
|||
self._execute ( command, "Removing tool build directory" )
|
||||
|
||||
command = [ 'cmake' ]
|
||||
if self._ninja: command += [ "-G", "Ninja" ]
|
||||
if self._devtoolset2: command += [ "-D", "Boost_NO_SYSTEM_PATHS:STRING=TRUE" ]
|
||||
if self._qt5: command += [ "-D", "WITH_QT5:STRING=TRUE" ]
|
||||
if self._openmp: command += [ "-D", "WITH_OPENMP:STRING=TRUE" ]
|
||||
if self._ninja: command += [ "-G", "Ninja" ]
|
||||
if self._noSystemBoost: command += [ "-D", "Boost_NO_SYSTEM_PATHS:STRING=TRUE" ]
|
||||
if self._qt5: command += [ "-D", "WITH_QT5:STRING=TRUE" ]
|
||||
if self._openmp: command += [ "-D", "WITH_OPENMP:STRING=TRUE" ]
|
||||
|
||||
command += [ "-D", "CMAKE_BUILD_TYPE:STRING=%s" % self.buildMode
|
||||
, "-D", "BUILD_SHARED_LIBS:STRING=%s" % self.enableShared
|
||||
|
@ -296,6 +303,9 @@ class Builder:
|
|||
if self._devtoolset2:
|
||||
self._environment[ 'BOOST_INCLUDEDIR' ] = '/opt/rh/devtoolset-2/root/usr/include'
|
||||
self._environment[ 'BOOST_LIBRARYDIR' ] = '/opt/rh/devtoolset-2/root/usr/lib'
|
||||
if self._macports:
|
||||
self._environment[ 'BOOST_INCLUDEDIR' ] = '/opt/local/include'
|
||||
self._environment[ 'BOOST_LIBRARYDIR' ] = '/opt/local/lib'
|
||||
|
||||
# Set or guess the various projects TOP environment variables.
|
||||
for project in self.projects:
|
||||
|
|
|
@ -197,28 +197,29 @@ autoLocate()
|
|||
checkCMake()
|
||||
|
||||
parser = optparse.OptionParser ()
|
||||
parser.add_option ( "-g", "--gui" , action="store_true" , dest="gui" , help="Lauch the graphical interface." )
|
||||
parser.add_option ( "-g", "--gui" , action="store_true" , dest="gui" , help="Lauch the graphical interface." )
|
||||
# Build relateds.
|
||||
parser.add_option ( "-c", "--conf" , type="string", dest="conf" , help="Fichier de configuration." )
|
||||
parser.add_option ( "--show-conf" , action="store_true" , dest="showConf" , help="Display the Project/Tools configuration, then exit." )
|
||||
parser.add_option ( "-q", "--quiet" , action="store_true" , dest="quiet" , help="Do not print all the informative messages." )
|
||||
parser.add_option ( "-r", "--release" , action="store_true" , dest="release" , help="Build a <Release> aka optimized version." )
|
||||
parser.add_option ( "-d", "--debug" , action="store_true" , dest="debug" , help="Build a <Debug> aka (-g) version." )
|
||||
parser.add_option ( "-s", "--static" , action="store_true" , dest="static" , help="Try to link statically, as much as possible." )
|
||||
parser.add_option ( "--doc" , action="store_true" , dest="doc" , help="Enable the documentation building (uses with -j1)." )
|
||||
parser.add_option ( "-v", "--verbose" , action="store_true" , dest="verboseMakefile" , help="Tells CMake to print all compilation commands." )
|
||||
parser.add_option ( "--root" , action="store" , type="string", dest="rootDir" , help="The root directory (default: <~/coriolis-2.x/>)." )
|
||||
parser.add_option ( "--no-build" , action="store_true" , dest="noBuild" , help="Do *not* build anything (by default: build)." )
|
||||
parser.add_option ( "--no-cache" , action="store_true" , dest="noCache" , help="Remove previous CMake cache before building." )
|
||||
parser.add_option ( "--rm-build" , action="store_true" , dest="rmBuild" , help="Remove previous build directoty before building." )
|
||||
parser.add_option ( "--devtoolset-2", action="store_true" , dest="devtoolset2" , help="Build against TUV Dev Toolset 2." )
|
||||
parser.add_option ( "--qt5" , action="store_true" , dest="qt5" , help="Build against Qt 5 (default: Qt 4)." )
|
||||
parser.add_option ( "--openmp" , action="store_true" , dest="openmp" , help="Enable the use of OpenMP in Gcc." )
|
||||
parser.add_option ( "--ninja" , action="store_true" , dest="ninja" , help="Use Ninja instead of UNIX Makefile." )
|
||||
parser.add_option ( "--clang" , action="store_true" , dest="clang" , help="Force use of Clang C/C++ compiler instead of system default." )
|
||||
parser.add_option ( "--make" , action="store" , type="string", dest="makeArguments", help="Arguments to pass to make (ex: \"-j4 install\")." )
|
||||
parser.add_option ( "--project" , action="append" , type="string", dest="projects" , help="The name of a project to build (may appears any number of time)." )
|
||||
parser.add_option ( "-t", "--tool" , action="append" , type="string", dest="tools" , help="The name of a tool to build (may appears any number of time)." )
|
||||
parser.add_option ( "-c", "--conf" , type="string", dest="conf" , help="Fichier de configuration." )
|
||||
parser.add_option ( "--show-conf" , action="store_true" , dest="showConf" , help="Display the Project/Tools configuration, then exit." )
|
||||
parser.add_option ( "-q", "--quiet" , action="store_true" , dest="quiet" , help="Do not print all the informative messages." )
|
||||
parser.add_option ( "-r", "--release" , action="store_true" , dest="release" , help="Build a <Release> aka optimized version." )
|
||||
parser.add_option ( "-d", "--debug" , action="store_true" , dest="debug" , help="Build a <Debug> aka (-g) version." )
|
||||
parser.add_option ( "-s", "--static" , action="store_true" , dest="static" , help="Try to link statically, as much as possible." )
|
||||
parser.add_option ( "--doc" , action="store_true" , dest="doc" , help="Enable the documentation building (uses with -j1)." )
|
||||
parser.add_option ( "-v", "--verbose" , action="store_true" , dest="verboseMakefile" , help="Tells CMake to print all compilation commands." )
|
||||
parser.add_option ( "--root" , action="store" , type="string", dest="rootDir" , help="The root directory (default: <~/coriolis-2.x/>)." )
|
||||
parser.add_option ( "--no-build" , action="store_true" , dest="noBuild" , help="Do *not* build anything (by default: build)." )
|
||||
parser.add_option ( "--no-cache" , action="store_true" , dest="noCache" , help="Remove previous CMake cache before building." )
|
||||
parser.add_option ( "--rm-build" , action="store_true" , dest="rmBuild" , help="Remove previous build directoty before building." )
|
||||
parser.add_option ( "--macports" , action="store_true" , dest="macports" , help="Build against MacPorts." )
|
||||
parser.add_option ( "--devtoolset-2" , action="store_true" , dest="devtoolset2" , help="Build against TUV Dev Toolset 2." )
|
||||
parser.add_option ( "--qt5" , action="store_true" , dest="qt5" , help="Build against Qt 5 (default: Qt 4)." )
|
||||
parser.add_option ( "--openmp" , action="store_true" , dest="openmp" , help="Enable the use of OpenMP in Gcc." )
|
||||
parser.add_option ( "--ninja" , action="store_true" , dest="ninja" , help="Use Ninja instead of UNIX Makefile." )
|
||||
parser.add_option ( "--clang" , action="store_true" , dest="clang" , help="Force use of Clang C/C++ compiler instead of system default." )
|
||||
parser.add_option ( "--make" , action="store" , type="string", dest="makeArguments", help="Arguments to pass to make (ex: \"-j4 install\")." )
|
||||
parser.add_option ( "--project" , action="append" , type="string", dest="projects" , help="The name of a project to build (may appears any number of time)." )
|
||||
parser.add_option ( "-t", "--tool" , action="append" , type="string", dest="tools" , help="The name of a tool to build (may appears any number of time)." )
|
||||
# SVN repository relateds.
|
||||
# Have to be ported to Git.
|
||||
#parser.add_option ( "--svn-tag" , action="store" , type="string", dest="svnTag" , help="Explicitly select a SVN tag (for SVN related commands)." )
|
||||
|
@ -288,6 +289,7 @@ else:
|
|||
if options.rmBuild: builder.rmBuild = True
|
||||
if options.ninja: builder.ninja = True
|
||||
if options.clang: builder.clang = True
|
||||
if options.macports: builder.macports = True
|
||||
if options.devtoolset2: builder.devtoolset2 = True
|
||||
if options.qt5: builder.qt5 = True
|
||||
if options.openmp: builder.openmp = True
|
||||
|
|
Loading…
Reference in New Issue