OCE destroot phase
Mark Brethen
mark.brethen at gmail.com
Sun Jun 15 04:21:19 PDT 2014
On Jun 15, 2014, at 2:18 AM, Ryan Schmidt <ryandesign at macports.org> wrote:
>
> On Jun 14, 2014, at 10:22 PM, Mark Brethen wrote:
>
>> OCE's Makefile does not appear to support the DESTDIR variable.
>
> I didn't know it was possible for a cmake-using build system to not support that...
>
Found in "CMakeLists.txt":
# How to build OCE using CMake under Unix (Linux, Darwin etc.)?
# 1. Copy this file, as-is, to the top-level OCE folder
# 2. Make a build directory somewhere outside the OCE source tree
# 3. cmake "relative/path/to/OCE"
# 4. make
# 5. make install (or sudo make install)
And in "INSTALL.Unix":
2. Configure step
=================
It is a good practice to build in a separate directory:
mkdir build
cd build
CMake can be configured either by a user interface (Qt and ncurses interfaces
are available) or directly by running
cmake ..
and editing the generated CMakeCache.txt file.
In the former case, the most common options can be defined from the
main window, and expert options can be modified in selecting "Advanced"
mode.
In the latter case, it is also possible to define options on the
command line. If you edit CMakeCache.txt by hand, do not forget to
rerun cmake after modifying this file.
2.1 Defining flags
==================
Here are default flags on Unix
OCE_BUILD_SHARED_LIB ON
OCE_BUILD_TYPE Release
OCE_DATAEXCHANGE ON
OCE_DRAW OFF
OCE_INSTALL_PREFIX /usr/local
OCE_MODEL ON
OCE_MULTITHREAD_LIBRARY NONE
OCE_OCAF ON
OCE_VISUALISATION ON
OCE_WITH_FREEIMAGE OFF
OCE_WITH_GL2PS OFF
In order to modify installation path and build DRAWEXE, one
can run these commands:
flags=""
flags="$flags -DOCE_INSTALL_PREFIX:PATH=$HOME/oce"
flags="$flags -DOCE_DRAW:BOOL=ON"
cmake $flags ..
2.2 Expert options
==================
More expert options can be defined in the "Advanced mode".
2.2.1 Additional flags:
=====================
OCE can be compiled with TBB or OpenMP in order to support parallel meshing.
By default, this support is disabled. Enable it with
flags="$flags -DOCE_MULTITHREAD_LIBRARY:STRING=TBB"
or
flags="$flags -DOCE_MULTITHREAD_LIBRARY:STRING=OPENMP"
There are many more options, see CMakeCache.txt for a full list.
3. Make step
============
If configure exits successfully, you can then build the whole OCE
by running the following commands:
make
make install/strip
If you have more than one (for instance 2) cores on your machine, you can use
make -j2
to enable multiprocessed compilation and speedup the whole compilation
process.
If you enabled tests when configuring by passing -DOCE_TESTING:BOOL=ON
flag to CMake, you can now run our battery of tests:
make test
All tests should pass except BRepMeshTestSuite.testMeshTorus, this test
exhibits a bug which has not been fixed yet.
Mark
More information about the macports-dev
mailing list