[Cmb-users] Building v4 w/ OpenCascade on Mac OS

David Thompson david.thompson at kitware.com
Thu Apr 2 15:33:16 EDT 2015


Hi Bob,

I was able to build CMB v4 using the instructions below and load a variety of CGM files. What models were giving you trouble? (There are definitely a few that cause crashes, but deep inside OpenCascade.)

	David

1. Check out a slightly-modified CMB superbuild

    cd /src
    git clone https://gitlab.kitware.com/dcthomp/cmb-superbuild.git
    cd cmb-superbuild
    git checkout cmb-with-oce

2. Build the superbuild, including CMB:

    cd /bld
    mkdir cmb-superbuild
    cd cmb-superbuild
    cat >> CMakeCache.txt
    CMAKE_BUILD_TYPE:STRING=Release
    CMAKE_OSX_ARCHITECTURES:STRING=x86_64
    CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9
    CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
    ENABLE_cmb_BUILD_MODE:STRING=SuperBuild
    ENABLE_smtk_BUILD_MODE:STRING=Release
    QT_QMAKE_EXECUTABLE:STRING=/usr/local/bin/qmake
    USE_SYSTEM_python:BOOL=ON
    USE_SYSTEM_qt:BOOL=ON
    ^D
    cmake /src/cmb-superbuild
    make

3. Run ModelBuilder. Note the environment variable.
   OpenCascade does not properly link its libraries on OS X, so this is required:

    cd /bld/cmb-superbuild/cmb/src/cmb-build
    DYLD_FALLBACK_LIBRARY_PATH=/bld/cmb-superbuild/install/lib ./bin/ModelBuilder.app/Contents/MacOS/ModelBuilder

4. Load the SMTK plugins exposing modeling kernels.

    - Choose the Tools→Manage Plugins... menu
    - Click "Load New..." in the Plugin Manager dialog.
    - Navigate to /bld/cmb-superbuild/install/lib and choose libsmtkCGMSession_Plugin.dylib
    - In the Plugin Manager, click the triangle to the left of "smtkCGMSession_Plugin" and check the "Auto Load" option.
    - You may also wish to do the above for:
      - libsmtkDiscreteSession_Plugin.dylib
      - libsmtkExodusSession_Plugin.dylib
      - libsmtkRemoteSessionPlugin.dylib
    - Quit and restart ModelBuilder so that the autoload settings are preserved. (This way you do not need to manage plugins again.)

5. Load a CGM/OpenCascade model by typing Cmd-O or clicking the Open toolbar button or choosing the File→Open menu item. You can also choose File→New Session...→cgm and use the operators (right click on the session in the model pane) to create a new model from scratch.



More information about the Cmb-users mailing list