Skip to content

Instantly share code, notes, and snippets.

@edisongustavo
Last active December 14, 2016 13:38
Show Gist options
  • Save edisongustavo/3d6bbc98b29db5f281aa08c3e3f0ec50 to your computer and use it in GitHub Desktop.
Save edisongustavo/3d6bbc98b29db5f281aa08c3e3f0ec50 to your computer and use it in GitHub Desktop.
mkdir build
cd build
set CMAKE_CONFIG="Release"
cmake -LAH -G"NMake Makefiles" ^
-DCMAKE_BUILD_TYPE="%CMAKE_CONFIG%" ^
-DCMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" ^
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
-DWITH_CGAL_ImageIO=OFF -DWITH_CGAL_Qt5=OFF ^
..
if errorlevel 1 exit 1
cmake --build . --config %CMAKE_CONFIG% --target INSTALL
if errorlevel 1 exit 1
cd ..
set conda_build_directory="%cd%"
subst Z: %cd%
Z:
:: language bindings are in a separate repo without releases
git clone https://github.com/CGAL/cgal-swig-bindings.git --depth=1
cd cgal-swig-bindings
:: https://github.com/CGAL/cgal-swig-bindings/pull/80
git remote add xantares https://github.com/xantares/cgal-swig-bindings.git
git fetch xantares
git cherry-pick e21de9d
:: this test requires numpy and we do not want to build-depend on it
del examples\python\test_aabb2.py
mkdir build
cd build
cmake -LAH -G"NMake Makefiles" ^
-DCMAKE_BUILD_TYPE="%CMAKE_CONFIG%" ^
-DCMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" ^
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
-DPYTHON_MODULE_PATH="%SP_DIR%" ^
-DBUILD_JAVA=OFF ^
..
if errorlevel 1 goto cleanup_with_error
cmake --build . --config %CMAKE_CONFIG% --target INSTALL
if errorlevel 1 goto cleanup_with_error
:: https://github.com/CGAL/cgal-swig-bindings/pull/79
move "%LIBRARY_PREFIX%\Lib\site-packages\CGAL" "%SP_DIR%"
ctest -C %CMAKE_CONFIG% --output-on-failure
if errorlevel 1 goto cleanup_with_error
subst /D Z:
exit 0
:cleanup_with_error
cd /d "%conda_build_directory%"
subst /D Z:
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment