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._noCache = False
|
||||||
self._ninja = False
|
self._ninja = False
|
||||||
self._clang = False
|
self._clang = False
|
||||||
|
self._noSystemBoost = False
|
||||||
|
self._macports = False
|
||||||
self._devtoolset2 = False
|
self._devtoolset2 = False
|
||||||
self._qt5 = False
|
self._qt5 = False
|
||||||
self._openmp = False
|
self._openmp = False
|
||||||
|
@ -61,7 +63,12 @@ class Builder:
|
||||||
elif attribute == "noCache": self._noCache = value
|
elif attribute == "noCache": self._noCache = value
|
||||||
elif attribute == "ninja": self._ninja = value
|
elif attribute == "ninja": self._ninja = value
|
||||||
elif attribute == "clang": self._clang = 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 == "qt5": self._qt5 = value
|
||||||
elif attribute == "openmp": self._openmp = value
|
elif attribute == "openmp": self._openmp = value
|
||||||
elif attribute == "enableDoc": self._enableDoc = value
|
elif attribute == "enableDoc": self._enableDoc = value
|
||||||
|
@ -167,7 +174,7 @@ class Builder:
|
||||||
|
|
||||||
command = [ 'cmake' ]
|
command = [ 'cmake' ]
|
||||||
if self._ninja: command += [ "-G", "Ninja" ]
|
if self._ninja: command += [ "-G", "Ninja" ]
|
||||||
if self._devtoolset2: command += [ "-D", "Boost_NO_SYSTEM_PATHS:STRING=TRUE" ]
|
if self._noSystemBoost: command += [ "-D", "Boost_NO_SYSTEM_PATHS:STRING=TRUE" ]
|
||||||
if self._qt5: command += [ "-D", "WITH_QT5:STRING=TRUE" ]
|
if self._qt5: command += [ "-D", "WITH_QT5:STRING=TRUE" ]
|
||||||
if self._openmp: command += [ "-D", "WITH_OPENMP:STRING=TRUE" ]
|
if self._openmp: command += [ "-D", "WITH_OPENMP:STRING=TRUE" ]
|
||||||
|
|
||||||
|
@ -296,6 +303,9 @@ class Builder:
|
||||||
if self._devtoolset2:
|
if self._devtoolset2:
|
||||||
self._environment[ 'BOOST_INCLUDEDIR' ] = '/opt/rh/devtoolset-2/root/usr/include'
|
self._environment[ 'BOOST_INCLUDEDIR' ] = '/opt/rh/devtoolset-2/root/usr/include'
|
||||||
self._environment[ 'BOOST_LIBRARYDIR' ] = '/opt/rh/devtoolset-2/root/usr/lib'
|
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.
|
# Set or guess the various projects TOP environment variables.
|
||||||
for project in self.projects:
|
for project in self.projects:
|
||||||
|
|
|
@ -211,6 +211,7 @@ parser.add_option ( "--root" , action="store" , type="string",
|
||||||
parser.add_option ( "--no-build" , action="store_true" , dest="noBuild" , help="Do *not* build anything (by default: build)." )
|
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 ( "--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 ( "--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 ( "--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 ( "--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 ( "--openmp" , action="store_true" , dest="openmp" , help="Enable the use of OpenMP in Gcc." )
|
||||||
|
@ -288,6 +289,7 @@ else:
|
||||||
if options.rmBuild: builder.rmBuild = True
|
if options.rmBuild: builder.rmBuild = True
|
||||||
if options.ninja: builder.ninja = True
|
if options.ninja: builder.ninja = True
|
||||||
if options.clang: builder.clang = True
|
if options.clang: builder.clang = True
|
||||||
|
if options.macports: builder.macports = True
|
||||||
if options.devtoolset2: builder.devtoolset2 = True
|
if options.devtoolset2: builder.devtoolset2 = True
|
||||||
if options.qt5: builder.qt5 = True
|
if options.qt5: builder.qt5 = True
|
||||||
if options.openmp: builder.openmp = True
|
if options.openmp: builder.openmp = True
|
||||||
|
|
Loading…
Reference in New Issue