Selaa lähdekoodia

Add workflows for GitHub Actions + misc fixes.

- Fixes #1229 by defaulting to static MSVC runtime on Windows.
- CMake will now fail if LIBIGL_WITH_CGAL is ON but CGAL is not found
  (e.g. missing Boost or gmp/mpfr).
- Removed some duplicated template instantiations on Windows.
- Added IGL_DEBUG_OFF to disable slow unit test in Debug configuration
  by default.
- Do not FORCE options given to third-party libraries.
Jérémie Dumas 6 vuotta sitten
vanhempi
sitoutus
252017af44

+ 0 - 34
.appveyor.yml

@@ -1,34 +0,0 @@
-version: 1.0.{build}
-os: Visual Studio 2017
-platform: x64
-clone_folder: C:\projects\libigl
-shallow_clone: true
-branches:
-  only:
-    - master
-    - dev
-environment:
-  matrix:
-  - CONFIG: Debug
-    BOOST_ROOT: C:/Libraries/boost_1_65_1
-  - CONFIG: Release
-    BOOST_ROOT: C:/Libraries/boost_1_65_1
-build:
-  parallel: true
-build_script:
-  - cd c:\projects\libigl
-  # Tutorials and tests
-  - mkdir build
-  - cd build
-  - cmake -DCMAKE_BUILD_TYPE=%CONFIG%
-      -DLIBIGL_WITH_CGAL=ON
-      -DLIBIGL_WITH_COMISO=OFF
-      -G "Visual Studio 15 2017 Win64"
-      ../
-  - set MSBuildLogger="C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
-  - set MSBuildOptions=/v:m /m /p:BuildInParallel=true /p:Configuration=%CONFIG% /logger:%MSBuildLogger%
-  - msbuild %MSBuildOptions% libigl.sln
-
-test_script:
-  - set CTEST_OUTPUT_ON_FAILURE=1
-  - ctest -C %CONFIG% --verbose --output-on-failure -j 2

+ 141 - 0
.github/workflows/continuous.yml

@@ -0,0 +1,141 @@
+name: Build
+
+on:
+  push: {}
+  pull_request: {}
+
+env:
+  CTEST_OUTPUT_ON_FAILURE: ON
+  CTEST_PARALLEL_LEVEL: 2
+
+jobs:
+  ####################
+  # Linux / macOS
+  ####################
+
+  Unix:
+    name: ${{ matrix.name }} (${{ matrix.config }}, ${{ matrix.static }})
+    runs-on: ${{ matrix.os }}
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [ubuntu-18.04, macos-latest]
+        config: [Release]
+        static: [ON, OFF]
+        include:
+          - os: macos-latest
+            name: macOS
+          - os: ubuntu-18.04
+            name: Linux
+    env:
+      LIBIGL_NUM_THREADS: 1  # See https://github.com/libigl/libigl/pull/996
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v1
+        with:
+          fetch-depth: 1
+
+      - name: Dependencies (Linux)
+        if: runner.os == 'Linux'
+        run: |
+            sudo apt-get install \
+            libblas-dev \
+            libboost-filesystem-dev \
+            libboost-system-dev \
+            libboost-thread-dev \
+            libglu1-mesa-dev \
+            liblapack-dev \
+            libmpfr-dev \
+            xorg-dev \
+            ccache
+
+      - name: Dependencies (macOS)
+        if: runner.os == 'macOS'
+        run: brew install boost gmp mpfr ccache
+
+      - name: Cache Build
+        id: cache-build
+        uses: actions/cache@v1
+        with:
+          path: ~/.ccache
+          key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.static }}-cache
+
+      - name: Prepare ccache
+        run: |
+          ccache --max-size=1.0G
+          ccache -V && ccache --show-stats && ccache --zero-stats
+
+      - name: Configure
+        run: |
+          mkdir -p build
+          cd build
+          cmake .. \
+            -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
+            -DCMAKE_BUILD_TYPE=${{ matrix.config }} \
+            -DLIBIGL_USE_STATIC_LIBRARY=${{ matrix.static }} \
+            -DLIBIGL_WITH_CGAL=ON \
+            -DLIBIGL_WITH_COMISO=ON
+
+      - name: Build
+        run: cd build; make -j2; ccache --show-stats
+
+      - name: Tests
+        run: cd build; ctest --verbose
+
+  ####################
+  # Windows
+  ####################
+
+  Windows:
+    runs-on: windows-2019
+    env:
+      CC: cl.exe
+      CXX: cl.exe
+    strategy:
+      fail-fast: false
+      matrix:
+        config: [Release]
+        static: [ON, OFF]
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v1
+        with:
+          fetch-depth: 1
+      - uses: seanmiddleditch/gha-setup-ninja@master
+
+        # https://github.com/actions/cache/issues/101
+      - name: Set env
+        run: echo "::set-env name=appdata::$($env:LOCALAPPDATA)"
+
+      - name: Cache build
+        id: cache-build
+        uses: actions/cache@v1
+        with:
+          path: ${{ env.appdata }}\Mozilla\sccache
+          key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.static }}-cache
+
+      - name: Prepare sccache
+        run: |
+          Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
+          scoop install sccache --global
+          # Scoop modifies the PATH so we make the modified PATH global.
+          echo "::set-env name=PATH::$env:PATH"
+
+        # We run configure + build in the same step, since they both need to call VsDevCmd
+        # Also, cmd uses ^ to break commands into multiple lines (in powershell this is `)
+      - name: Configure and build
+        shell: cmd
+        run: |
+          call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64
+          cmake -G Ninja ^
+            -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ^
+            -DCMAKE_BUILD_TYPE=${{ matrix.config }} ^
+            -DLIBIGL_USE_STATIC_LIBRARY=${{ matrix.static }} ^
+            -DLIBIGL_WITH_CGAL=ON ^
+            -DLIBIGL_WITH_COMISO=OFF ^
+            -B build ^
+            -S .
+          cmake --build build
+
+      - name: Tests
+        run: cd build; ctest --verbose

+ 169 - 0
.github/workflows/daily.yml

@@ -0,0 +1,169 @@
+name: Daily
+
+on:
+  schedule:
+    - cron:  '0 4 * * *'
+
+env:
+  CTEST_OUTPUT_ON_FAILURE: ON
+  CTEST_PARALLEL_LEVEL: 2
+
+jobs:
+  ####################
+  # Linux / macOS
+  ####################
+
+  # Part of this file is inspired from
+  # https://github.com/onqtam/doctest/blob/dev/.github/workflows/main.yml
+
+  Unix:
+    name: ${{ matrix.name }} (${{ matrix.config }}, ${{ matrix.static }})
+    runs-on: ${{ matrix.os }}
+    strategy:
+      fail-fast: false
+      matrix:
+        name: [
+          ubuntu-18.04-gcc-7,
+          ubuntu-18.04-gcc-8,
+          ubuntu-18.04-gcc-9,
+          ubuntu-18.04-clang-7,
+          ubuntu-18.04-clang-8,
+          ubuntu-18.04-clang-9,
+          macOS-latest,
+        ]
+        config: [Debug, Release]
+        static: [ON, OFF]
+        include:
+          - name: ubuntu-18.04-gcc-7
+            os: ubuntu-18.04
+            compiler: gcc
+            version: "7"
+
+          - name: ubuntu-18.04-gcc-8
+            os: ubuntu-18.04
+            compiler: gcc
+            version: "8"
+
+          - name: ubuntu-18.04-gcc-9
+            os: ubuntu-18.04
+            compiler: gcc
+            version: "9"
+
+          - name: ubuntu-18.04-clang-7
+            os: ubuntu-18.04
+            compiler: clang
+            version: "7"
+
+          - name: ubuntu-18.04-clang-8
+            os: ubuntu-18.04
+            compiler: clang
+            version: "8"
+
+          - name: ubuntu-18.04-clang-9
+            os: ubuntu-18.04
+            compiler: clang
+            version: "9"
+
+          - name: macOS-latest
+            os: macOS-latest
+    env:
+      LIBIGL_NUM_THREADS: 1  # See https://github.com/libigl/libigl/pull/996
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v1
+        with:
+          fetch-depth: 1
+
+      - name: Dependencies (Linux)
+        if: runner.os == 'Linux'
+        run: |
+            # LLVM 9 is not in Bionic's repositories so we add the official LLVM repository.
+            if [ "${{ matrix.compiler }}" = "clang" ] && [ "${{ matrix.version }}" = "9" ]; then
+              sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main"
+            fi
+            sudo apt-get update
+
+            if [ "${{ matrix.compiler }}" = "gcc" ]; then
+              sudo apt-get install -y g++-${{ matrix.version }}
+              echo "::set-env name=CC::gcc-${{ matrix.version }}"
+              echo "::set-env name=CXX::g++-${{ matrix.version }}"
+            else
+              sudo apt-get install -y clang-${{ matrix.version }}
+              echo "::set-env name=CC::clang-${{ matrix.version }}"
+              echo "::set-env name=CXX::clang++-${{ matrix.version }}"
+            fi
+
+            sudo apt-get install \
+              libblas-dev \
+              libboost-filesystem-dev \
+              libboost-system-dev \
+              libboost-thread-dev \
+              libglu1-mesa-dev \
+              liblapack-dev \
+              libmpfr-dev \
+              xorg-dev
+
+      - name: Dependencies (macOS)
+        if: runner.os == 'macOS'
+        run: brew install boost gmp mpfr
+
+      - name: Configure
+        run: |
+          mkdir -p build
+          cd build
+          cmake .. \
+            -DCMAKE_BUILD_TYPE=${{ matrix.config }} \
+            -DLIBIGL_USE_STATIC_LIBRARY=${{ matrix.static }} \
+            -DLIBIGL_WITH_CGAL=ON \
+            -DLIBIGL_WITH_COMISO=ON
+
+      - name: Build
+        run: cd build; make -j2
+
+      - name: Tests
+        run: cd build; ctest --verbose
+
+  ####################
+  # Windows
+  ####################
+
+  Windows:
+    runs-on: windows-2019
+    env:
+      CC: cl.exe
+      CXX: cl.exe
+    strategy:
+      fail-fast: false
+      matrix:
+        config: [Debug, Release]
+        static: [ON, OFF]
+        include:
+          - config: Debug
+            tutorials: OFF
+          - config: Release
+            tutorials: ON
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v1
+        with:
+          fetch-depth: 1
+      - uses: seanmiddleditch/gha-setup-ninja@master
+
+        # We run configure + build in the same step, since they both need to call VsDevCmd
+        # Also, cmd uses ^ to break commands into multiple lines (in powershell this is `)
+      - name: Configure and build
+        shell: cmd
+        run: |
+          call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64
+          cmake -G Ninja ^
+            -DCMAKE_BUILD_TYPE=${{ matrix.config }} ^
+            -DLIBIGL_USE_STATIC_LIBRARY=${{ matrix.static }} ^
+            -DLIBIGL_BUILD_TUTORIALS=${{ matrix.tutorials }} ^
+            -DLIBIGL_WITH_CGAL=ON ^
+            -DLIBIGL_WITH_COMISO=OFF ^
+            -B build ^
+            -S .
+          cmake --build build
+
+      - name: Tests
+        run: cd build; ctest --verbose

+ 0 - 72
.travis.yml

@@ -1,72 +0,0 @@
-dist: trusty
-sudo: true
-language: cpp
-cache: ccache
-addons:
-  apt:
-    sources:
-    - ubuntu-toolchain-r-test
-    packages:
-    - g++-7
-    - gcc-7
-    - libblas-dev
-    - libboost-filesystem-dev
-    - libboost-system-dev
-    - libboost-thread-dev
-    - libglu1-mesa-dev
-    - liblapack-dev
-    - libmpfr-dev
-    - xorg-dev
-  homebrew:
-    packages:
-    - ccache
-matrix:
-  include:
-  - os: linux
-    compiler: gcc # 4.8.4 by default on Trusty
-    env:
-    - MATRIX_EVAL="export CONFIG=Release"
-  - os: linux
-    compiler: gcc-7
-    env:
-    - MATRIX_EVAL="export CC=gcc-7 CXX=g++-7 CONFIG=Release"
-  - os: linux # same config like above but with -DLIBIGL_USE_STATIC_LIBRARY=OFF to test static and header-only builds
-    compiler: gcc-7
-    env:
-    - MATRIX_EVAL="export CC=gcc-7 CXX=g++-7 CONFIG=Release CMAKE_EXTRA='-DLIBIGL_USE_STATIC_LIBRARY=OFF'"
-  - os: osx
-    osx_image: xcode10.2
-    compiler: clang
-    env:
-    - MATRIX_EVAL="export CONFIG=Debug LIBIGL_NUM_THREADS=1"
-  - os: osx # same config like above but with -DLIBIGL_USE_STATIC_LIBRARY=OFF to test static and header-only builds
-    osx_image: xcode10.2
-    compiler: clang
-    env:
-    - MATRIX_EVAL="export CONFIG=Debug LIBIGL_NUM_THREADS=1 CMAKE_EXTRA='-DLIBIGL_USE_STATIC_LIBRARY=OFF'"
-  - os: osx
-    osx_image: xcode10.2
-    compiler: clang
-    env:
-    - MATRIX_EVAL="export CONFIG=Debug PYTHON=python3 LIBIGL_NUM_THREADS=1 CMAKE_EXTRA='-DLIBIGL_EIGEN_VERSION=3.3.7'""
-
-install:
-- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH="/usr/local/opt/ccache/libexec:$PATH"; fi
-- eval "${MATRIX_EVAL}"
-- ccache --max-size=5.0G
-- ccache -V && ccache --show-stats && ccache --zero-stats
-
-script:
-# Tutorials and tests
-- mkdir build
-- pushd build
-- cmake ${CMAKE_EXTRA}
-    -DCMAKE_BUILD_TYPE=$CONFIG
-    -DLIBIGL_CHECK_UNDEFINED=ON
-    -DLIBIGL_WITH_CGAL=ON
-    ../
-- make -j 2
-- ctest --verbose
-- popd
-- rm -rf build
-- ccache --show-stats

+ 5 - 5
README.md

@@ -1,8 +1,8 @@
 # libigl - A simple C++ geometry processing library
-[![Build Status](https://travis-ci.org/libigl/libigl.svg?branch=master)](https://travis-ci.org/libigl/libigl)
-[![Build status](https://ci.appveyor.com/api/projects/status/mf3t9rnhco0vhly8/branch/master?svg=true)](https://ci.appveyor.com/project/danielepanozzo/libigl-6hjk1/branch/master)
-![](https://github.com/libigl/libigl-legacy/raw/5ff6387765fa85ca46f1a6222728e35e2b8b8961/libigl-teaser.png)
+![](https://github.com/libigl/libigl/workflows/Build/badge.svg)
+![](https://github.com/libigl/libigl/workflows/Daily/badge.svg)
+[![](https://anaconda.org/conda-forge/igl/badges/installer/conda.svg)](https://conda.anaconda.org/conda-forge/igl)
 
-Documentation, tutorial, and instructions at <https://libigl.github.io>.
+![](https://libigl.github.io/libigl-teaser.png)
 
-:exclamation: **On October 15, 2018, a new, cleaned-up history was pushed onto the main libigl repository. To learn more about the consequences of this, and troubleshooting, please read [this page](https://libigl.github.io/rewritten-history/).**
+Documentation, tutorial, and instructions at <https://libigl.github.io>.

+ 8 - 4
cmake/LibiglWindows.cmake

@@ -1,8 +1,6 @@
 if(MSVC)
-	if("${MSVC_RUNTIME}" STREQUAL "")
-		set(MSVC_RUNTIME "static")
-	endif()
-	if(${MSVC_RUNTIME} STREQUAL "static")
+	option(IGL_STATIC_RUNTIME "Use libigl with the static MSVC runtime." OFF)
+	if(IGL_STATIC_RUNTIME)
 		message(STATUS "MSVC -> forcing use of statically-linked runtime.")
 		foreach(config ${CMAKE_CONFIGURATION_TYPES})
 			string(TOUPPER ${config} config)
@@ -19,4 +17,10 @@ if(MSVC)
 		endforeach()
 		string(REPLACE "/MTd" "/MDd" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
 	endif()
+
+	# https://github.com/mozilla/sccache/issues/242
+	if(CMAKE_CXX_COMPILER_LAUNCHER STREQUAL "sccache")
+		string(REGEX REPLACE "/Z[iI7]" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
+		set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Z7")
+	endif()
 endif()

+ 23 - 20
cmake/libigl.cmake

@@ -88,7 +88,7 @@ if(MSVC)
   target_compile_definitions(igl_common INTERFACE -DNOMINMAX)
 endif()
 
-### Set compiler flags for building the tests on Windows with Visual Studio
+# Controls whether to use the static MSVC runtime or not
 include(LibiglWindows)
 
 if(BUILD_SHARED_LIBS)
@@ -178,8 +178,6 @@ function(compile_igl_module module_dir)
         # This one is when using bools in adjacency matrices
         /wd4804 #'+=': unsafe use of type 'bool' in operation
       )
-    else()
-      #target_compile_options(${module_libname} PRIVATE -w) # disable all warnings (not ideal but...)
     endif()
   else()
     add_library(${module_libname} INTERFACE)
@@ -226,6 +224,7 @@ if(LIBIGL_WITH_CGAL)
     set(CGAL_DIR "${LIBIGL_EXTERNAL}/cgal")
     igl_download_cgal()
     igl_download_cgal_deps()
+    message("BOOST_ROOT: ${BOOST_ROOT}")
     if(EXISTS ${LIBIGL_EXTERNAL}/boost)
       set(BOOST_ROOT "${LIBIGL_EXTERNAL}/boost")
     endif()
@@ -239,7 +238,7 @@ if(LIBIGL_WITH_CGAL)
     compile_igl_module("cgal")
     target_link_libraries(igl_cgal ${IGL_SCOPE} CGAL::CGAL CGAL::CGAL_Core)
   else()
-    set(LIBIGL_WITH_CGAL OFF CACHE BOOL "" FORCE)
+    message(FATAL_ERROR "Could not define CGAL::CGAL and CGAL::CGAL_Core.")
   endif()
 endif()
 
@@ -299,20 +298,19 @@ endif()
 if(LIBIGL_WITH_EMBREE)
   set(EMBREE_DIR "${LIBIGL_EXTERNAL}/embree")
 
-  set(EMBREE_TESTING_INTENSITY 0 CACHE STRING "" FORCE)
-  set(EMBREE_ISPC_SUPPORT OFF CACHE BOOL " " FORCE)
-  set(EMBREE_TASKING_SYSTEM "INTERNAL" CACHE BOOL " " FORCE)
-  set(EMBREE_TUTORIALS OFF CACHE BOOL " " FORCE)
-  set(EMBREE_MAX_ISA "SSE2" CACHE STRING " " FORCE)
-  set(EMBREE_STATIC_LIB ON CACHE BOOL " " FORCE)
-  if(MSVC)
-    set(EMBREE_STATIC_RUNTIME ON CACHE BOOL " " FORCE)
-  endif()
-
   if(NOT TARGET embree)
-    # TODO: Should probably save/restore the CMAKE_CXX_FLAGS_*, since embree seems to be
-    # overriding them on Windows. But well... it works for now.
     igl_download_embree()
+
+    set(EMBREE_TESTING_INTENSITY 0 CACHE STRING "")
+    set(EMBREE_ISPC_SUPPORT OFF CACHE BOOL " ")
+    set(EMBREE_TASKING_SYSTEM "INTERNAL" CACHE BOOL " ")
+    set(EMBREE_TUTORIALS OFF CACHE BOOL " ")
+    set(EMBREE_MAX_ISA "SSE2" CACHE STRING " ")
+    set(EMBREE_STATIC_LIB ON CACHE BOOL " ")
+    if(MSVC)
+      set(EMBREE_STATIC_RUNTIME ${IGL_STATIC_RUNTIME} CACHE BOOL "Use the static version of the C/C++ runtime library.")
+    endif()
+
     add_subdirectory("${EMBREE_DIR}" "embree" EXCLUDE_FROM_ALL)
   endif()
 
@@ -374,11 +372,16 @@ if(LIBIGL_WITH_OPENGL_GLFW)
     # GLFW module
     compile_igl_module("opengl/glfw")
     if(NOT TARGET glfw)
-      set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL " " FORCE)
-      set(GLFW_BUILD_TESTS OFF CACHE BOOL " " FORCE)
-      set(GLFW_BUILD_DOCS OFF CACHE BOOL " " FORCE)
-      set(GLFW_INSTALL OFF CACHE BOOL " " FORCE)
       igl_download_glfw()
+      option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" OFF)
+      option(GLFW_BUILD_TESTS "Build the GLFW test programs" OFF)
+      option(GLFW_BUILD_DOCS "Build the GLFW documentation" OFF)
+      option(GLFW_INSTALL "Generate installation target" OFF)
+      if(IGL_STATIC_RUNTIME)
+        set(USE_MSVC_RUNTIME_LIBRARY_DLL OFF CACHE BOOL "Use MSVC runtime library DLL" FORCE)
+      else()
+        set(USE_MSVC_RUNTIME_LIBRARY_DLL ON CACHE BOOL "Use MSVC runtime library DLL" FORCE)
+      endif()
       add_subdirectory(${LIBIGL_EXTERNAL}/glfw glfw)
     endif()
     target_link_libraries(igl_opengl_glfw ${IGL_SCOPE} igl_opengl glfw)

+ 0 - 1
include/igl/combine.cpp

@@ -93,6 +93,5 @@ template void igl::combine<Eigen::Matrix<double, -1, 3, 1, -1, 3>, Eigen::Matrix
 template void igl::combine<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(std::vector<Eigen::Matrix<double, -1, -1, 0, -1, -1>, std::allocator<Eigen::Matrix<double, -1, -1, 0, -1, -1> > > const&, std::vector<Eigen::Matrix<int, -1, -1, 0, -1, -1>, std::allocator<Eigen::Matrix<int, -1, -1, 0, -1, -1> > > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
 #ifdef WIN32
 template void igl::combine<Eigen::Matrix<double,-1,-1,0,-1,-1>, Eigen::Matrix<int,-1,-1,0,-1,-1>,Eigen::Matrix<double,-1,-1,0,-1,-1>,Eigen::Matrix<int,-1,-1,0,-1,-1>,Eigen::Matrix<unsigned __int64,-1,1,0,-1,1>,Eigen::Matrix<unsigned __int64,-1,1,0,-1,1> >(class std::vector<Eigen::Matrix<double,-1,-1,0,-1,-1>,class std::allocator<Eigen::Matrix<double,-1,-1,0,-1,-1> > > const &,class std::vector<Eigen::Matrix<int,-1,-1,0,-1,-1>,class std::allocator<Eigen::Matrix<int,-1,-1,0,-1,-1> > > const &,Eigen::PlainObjectBase<Eigen::Matrix<double,-1,-1,0,-1,-1> > &,Eigen::PlainObjectBase<Eigen::Matrix<int,-1,-1,0,-1,-1> > &,Eigen::PlainObjectBase<Eigen::Matrix<unsigned __int64,-1,1,0,-1,1> > &,Eigen::PlainObjectBase<Eigen::Matrix<unsigned __int64,-1,1,0,-1,1> > &);
-template void igl::combine<Eigen::Matrix<double,-1,-1,0,-1,-1>, Eigen::Matrix<int,-1,-1,0,-1,-1>,Eigen::Matrix<double,-1,-1,0,-1,-1>,Eigen::Matrix<int,-1,-1,0,-1,-1>,Eigen::Matrix<unsigned __int64,-1,1,0,-1,1>,Eigen::Matrix<unsigned __int64,-1,1,0,-1,1> >(class std::vector<Eigen::Matrix<double,-1,-1,0,-1,-1>,class std::allocator<Eigen::Matrix<double,-1,-1,0,-1,-1> > > const &,class std::vector<Eigen::Matrix<int,-1,-1,0,-1,-1>,class std::allocator<Eigen::Matrix<int,-1,-1,0,-1,-1> > > const &,Eigen::PlainObjectBase<Eigen::Matrix<double,-1,-1,0,-1,-1> > &,Eigen::PlainObjectBase<Eigen::Matrix<int,-1,-1,0,-1,-1> > &,Eigen::PlainObjectBase<Eigen::Matrix<unsigned __int64,-1,1,0,-1,1> > &,Eigen::PlainObjectBase<Eigen::Matrix<unsigned __int64,-1,1,0,-1,1> > &);
 #endif
 #endif

+ 0 - 3
include/igl/delaunay_triangulation.cpp

@@ -60,7 +60,4 @@ IGL_INLINE void igl::delaunay_triangulation(
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template instantiation
 template void igl::delaunay_triangulation<Eigen::Matrix<double, -1, -1, 0, -1, -1>, short (*)(double const*, double const*, double const*), short (*)(double const*, double const*, double const*, double const*), Eigen::Matrix<int, -1, -1, 0, -1, -1> >(Eigen::MatrixBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, short (*)(double const*, double const*, double const*), short (*)(double const*, double const*, double const*, double const*), Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
-#ifdef WIN32
-template void igl::delaunay_triangulation<class Eigen::Matrix<double, -1, -1, 0, -1, -1>, short(*)(double const *, double const *, double const *), short(*)(double const *, double const *, double const *, double const *), class Eigen::Matrix<int, -1, -1, 0, -1, -1>>(class Eigen::MatrixBase<class Eigen::Matrix<double, -1, -1, 0, -1, -1>> const &, short(*const)(double const *, double const *, double const *), short(*const)(double const *, double const *, double const *, double const *), class Eigen::PlainObjectBase<class Eigen::Matrix<int, -1, -1, 0, -1, -1>> &);
-#endif
 #endif

+ 5 - 8
include/igl/eigs.cpp

@@ -1,9 +1,9 @@
 // This file is part of libigl, a simple c++ geometry processing library.
-// 
+//
 // Copyright (C) 2016 Alec Jacobson <[email protected]>
-// 
-// This Source Code Form is subject to the terms of the Mozilla Public License 
-// v. 2.0. If a copy of the MPL was not distributed with this file, You can 
+//
+// This Source Code Form is subject to the terms of the Mozilla Public License
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
 // obtain one at http://mozilla.org/MPL/2.0/.
 #include "eigs.h"
 
@@ -135,7 +135,7 @@ IGL_INLINE bool igl::eigs(
       return false;
     }
     if(
-      i==0 || 
+      i==0 ||
       (S.head(i).array()-sigma).abs().maxCoeff()>1e-14 ||
       ((U.leftCols(i).transpose()*B*x).array().abs()<=1e-7).all()
       )
@@ -170,7 +170,4 @@ IGL_INLINE bool igl::eigs(
 #ifdef IGL_STATIC_LIBRARY
 // Explicit template instantiation
 template bool igl::eigs<double, double, Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, 1, 0, -1, 1> >(Eigen::SparseMatrix<double, 0, int> const&, Eigen::SparseMatrix<double, 0, int> const&, const size_t, igl::EigsType, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, 1, 0, -1, 1> >&);
-#ifdef WIN32
-template bool igl::eigs<double, double, Eigen::Matrix<double,-1,-1,0,-1,-1>, Eigen::Matrix<double,-1,1,0,-1,1> >(Eigen::SparseMatrix<double,0,int> const &,Eigen::SparseMatrix<double,0,int> const &, const size_t, igl::EigsType, Eigen::PlainObjectBase< Eigen::Matrix<double,-1,-1,0,-1,-1> > &, Eigen::PlainObjectBase<Eigen::Matrix<double,-1,1,0,-1,1> > &);
-#endif
 #endif

+ 1 - 1
tests/include/igl/bbw.cpp

@@ -5,7 +5,7 @@
 #include <igl/readTGF.h>
 #include <igl/bbw.h>
 
-TEST_CASE("bbw: decimated_knight", "[igl]")
+TEST_CASE("bbw: decimated_knight", "[igl]" IGL_DEBUG_OFF)
 {
   Eigen::MatrixXd V,C;
   Eigen::MatrixXi T,F,E;

+ 1 - 1
tests/include/igl/boundary_loop.cpp

@@ -19,7 +19,7 @@ TEST_CASE("boundary_loop: cube", "[igl]")
   REQUIRE (boundary.size() == 0);
 }
 
-TEST_CASE("boundary_loop: bunny", "[igl]")
+TEST_CASE("boundary_loop: bunny", "[igl]" IGL_DEBUG_OFF)
 {
   Eigen::MatrixXd V;
   Eigen::MatrixXi F;

+ 1 - 1
tests/include/igl/cotmatrix.cpp

@@ -2,7 +2,7 @@
 #include <igl/PI.h>
 #include <igl/cotmatrix.h>
 
-TEST_CASE("cotmatrix: constant_in_null_space", "[igl]")
+TEST_CASE("cotmatrix: constant_in_null_space", "[igl]" IGL_DEBUG_OFF)
 {
   const auto test_case = [](const std::string &param)
   {

+ 1 - 1
tests/include/igl/cotmatrix_intrinsic.cpp

@@ -61,7 +61,7 @@ TEST_CASE("cotmatrix_intrinsic: periodic", "[igl]")
   test_common::assert_near(L_d,L_gt,igl::EPS<double>());
 }
 
-TEST_CASE("cotmatrix_intrinsic: manifold_meshes", "[igl]")
+TEST_CASE("cotmatrix_intrinsic: manifold_meshes", "[igl]" IGL_DEBUG_OFF)
 {
   auto test_case = [](const std::string &param)
   {

+ 1 - 2
tests/include/igl/doublearea.cpp

@@ -1,8 +1,7 @@
 #include <test_common.h>
 #include <igl/doublearea.h>
 
-
-TEST_CASE("doublearea: VF_vs_ABC", "[igl]")
+TEST_CASE("doublearea: VF_vs_ABC", "[igl]" IGL_DEBUG_OFF)
 {
     auto test_case = [](const std::string &param)
     {

+ 34 - 35
tests/include/igl/edge_flaps.cpp

@@ -1,42 +1,41 @@
 #include <test_common.h>
 #include <igl/edge_flaps.h>
 
-
-TEST_CASE("edge_flaps: verify", "[igl]")
+TEST_CASE("edge_flaps: verify", "[igl]" IGL_DEBUG_OFF)
 {
-	const auto test_case = [](const std::string &param)
-	{
-	  Eigen::MatrixXd V;
-	  Eigen::MatrixXi F;
-	  igl::read_triangle_mesh(test_common::data_path(param), V, F);
+  const auto test_case = [](const std::string &param)
+  {
+    Eigen::MatrixXd V;
+    Eigen::MatrixXi F;
+    igl::read_triangle_mesh(test_common::data_path(param), V, F);
 
-	  Eigen::MatrixXi efE,efEF,efEI;
-	  Eigen::VectorXi efEMAP;
-	  igl::edge_flaps(F,efE,efEMAP,efEF,efEI);
-	  REQUIRE (efEF.rows() == efE.rows());
-	  REQUIRE (2 == efE.cols());
-	  REQUIRE (efEF.cols() == efE.cols());
-	  // for each edge, make sure edge appears in face
-	  for(int e = 0;e<efE.rows();e++)
-	  {
-	    for(int fe = 0;fe<2;fe++)
-	    {
-	      const int f = efEF(e,fe);
-	      // index of corner
-	      const int c = efEI(e,fe);
-	      REQUIRE (f<F.rows());
-	      // only check if not on boundary
-	      if(f >= 0)
-	      {
-	      	// Either efE(e,[1 2]) = [i,j] appears after vertex c of face f
-	      	// Or  efE(e,[2 1]) = [j,i] appears after vertex c of face f
-	        CHECK((
-	          ((efE(e,0) == F(f,(c+1)%3)) && (efE(e,1) == F(f,(c+2)%3))) ||
-	          ((efE(e,1) == F(f,(c+1)%3)) && (efE(e,0) == F(f,(c+2)%3)))));
-	      }
-	    }
-	  }
-	};
+    Eigen::MatrixXi efE,efEF,efEI;
+    Eigen::VectorXi efEMAP;
+    igl::edge_flaps(F,efE,efEMAP,efEF,efEI);
+    REQUIRE (efEF.rows() == efE.rows());
+    REQUIRE (2 == efE.cols());
+    REQUIRE (efEF.cols() == efE.cols());
+    // for each edge, make sure edge appears in face
+    for(int e = 0;e<efE.rows();e++)
+    {
+      for(int fe = 0;fe<2;fe++)
+      {
+        const int f = efEF(e,fe);
+        // index of corner
+        const int c = efEI(e,fe);
+        REQUIRE (f<F.rows());
+        // only check if not on boundary
+        if(f >= 0)
+        {
+          // Either efE(e,[1 2]) = [i,j] appears after vertex c of face f
+          // Or  efE(e,[2 1]) = [j,i] appears after vertex c of face f
+          CHECK((
+            ((efE(e,0) == F(f,(c+1)%3)) && (efE(e,1) == F(f,(c+2)%3))) ||
+            ((efE(e,1) == F(f,(c+1)%3)) && (efE(e,0) == F(f,(c+2)%3)))));
+        }
+      }
+    }
+  };
 
-	test_common::run_test_cases(test_common::all_meshes(), test_case);
+  test_common::run_test_cases(test_common::all_meshes(), test_case);
 }

+ 8 - 8
tests/include/igl/fast_winding_number.cpp

@@ -1,9 +1,9 @@
 // This file is part of libigl, a simple c++ geometry processing library.
-// 
+//
 // Copyright (C) 2019 Alec Jacobson <[email protected]>
-// 
-// This Source Code Form is subject to the terms of the Mozilla Public License 
-// v. 2.0. If a copy of the MPL was not distributed with this file, You can 
+//
+// This Source Code Form is subject to the terms of the Mozilla Public License
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
 // obtain one at http://mozilla.org/MPL/2.0/.
 #include <test_common.h>
 #include <igl/read_triangle_mesh.h>
@@ -52,7 +52,7 @@ TEST_CASE("fast_winding_number: one_point_cloud", "[igl]")
   test_common::assert_near(WiP,WiP_cached,1e-15);
 }
 
-TEST_CASE("fast_winding_number: meshes", "[igl]")
+TEST_CASE("fast_winding_number: meshes", "[igl]" IGL_DEBUG_OFF)
 {
   const auto test_case = [](const std::string &param)
   {
@@ -62,10 +62,10 @@ TEST_CASE("fast_winding_number: meshes", "[igl]")
     igl::read_triangle_mesh(test_common::data_path(param),V,F);
     // vertex centroid will be our query
     Eigen::MatrixXd Q = V.array().colwise().mean();
-  
+
     Eigen::VectorXd Wexact(1,1);
     Wexact(0,0) = igl::winding_number(V,F,Eigen::RowVector3d(Q));
-  
+
     // SOUP
     {
       INFO("soup");
@@ -75,7 +75,7 @@ TEST_CASE("fast_winding_number: meshes", "[igl]")
       igl::fast_winding_number(fwn_bvh,2,Q,Wfwn_soup);
       test_common::assert_near(Wfwn_soup,Wexact,1e-2);
     }
-    
+
     // CLOUD
     // triangle barycenters, normals and areas will be our point cloud
     {

+ 2 - 2
tests/include/igl/intrinsic_delaunay_cotmatrix.cpp

@@ -37,7 +37,7 @@ TEST_CASE("intrinsic_delaunay_cotmatrix: skewed_grid", "[igl]")
   }
 }
 
-TEST_CASE("intrinsic_delaunay_cotmatrix: manifold_meshes", "[igl]")
+TEST_CASE("intrinsic_delaunay_cotmatrix: manifold_meshes", "[igl]" IGL_DEBUG_OFF)
 {
   auto test_case = [](const std::string &param)
   {
@@ -56,7 +56,7 @@ TEST_CASE("intrinsic_delaunay_cotmatrix: manifold_meshes", "[igl]")
     // Off diagonals should be all non-positive
     for(int k = 0;k<LI.size();k++)
     {
-      if(LI(k) != LJ(k) && 
+      if(LI(k) != LJ(k) &&
         !(is_boundary_vertex[LI(k)] && is_boundary_vertex[LJ(k)]))
       {
         REQUIRE (-igl::EPS<double>() < LV(k));

+ 1 - 2
tests/include/igl/is_edge_manifold.cpp

@@ -1,8 +1,7 @@
 #include <test_common.h>
 #include <igl/is_edge_manifold.h>
 
-
-TEST_CASE("is_edge_manifold: positive", "[igl]")
+TEST_CASE("is_edge_manifold: positive", "[igl]" IGL_DEBUG_OFF)
 {
   const auto test_case = [](const std::string &param)
   {

+ 5 - 5
tests/include/igl/iterative_closest_point.cpp

@@ -1,15 +1,15 @@
 // This file is part of libigl, a simple c++ geometry processing library.
-// 
+//
 // Copyright (C) 2019 Alec Jacobson <[email protected]>
-// 
-// This Source Code Form is subject to the terms of the Mozilla Public License 
-// v. 2.0. If a copy of the MPL was not distributed with this file, You can 
+//
+// This Source Code Form is subject to the terms of the Mozilla Public License
+// v. 2.0. If a copy of the MPL was not distributed with this file, You can
 // obtain one at http://mozilla.org/MPL/2.0/.
 #include <test_common.h>
 #include <igl/iterative_closest_point.h>
 
 
-TEST_CASE("iterative_closest_point: identity","[igl]")
+TEST_CASE("iterative_closest_point: identity","[igl]" IGL_DEBUG_OFF)
 {
   const auto test_case = [](const std::string &param)
   {

+ 1 - 1
tests/include/igl/per_face_normals.cpp

@@ -3,7 +3,7 @@
 #include <igl/per_face_normals.h>
 #include <Eigen/Geometry>
 
-TEST_CASE("per_face_normals: dot", "[igl]")
+TEST_CASE("per_face_normals: dot", "[igl]" IGL_DEBUG_OFF)
 {
   const auto test_case = [](const std::string &param)
   {

+ 1 - 1
tests/include/igl/qslim.cpp

@@ -6,7 +6,7 @@
 //#include <igl/hausdorff.h>
 #include <igl/writePLY.h>
 
-TEST_CASE("qslim: cylinder", "[igl]")
+TEST_CASE("qslim: cylinder", "[igl]" IGL_DEBUG_OFF)
 {
   using namespace igl;
   const int axis_devisions = 5;

+ 1 - 2
tests/include/igl/triangle_triangle_adjacency.cpp

@@ -3,8 +3,7 @@
 #include <igl/triangle_triangle_adjacency.h>
 #include <Eigen/Geometry>
 
-
-TEST_CASE("triangle_triangle_adjacency: dot", "[igl]")
+TEST_CASE("triangle_triangle_adjacency: dot", "[igl]" IGL_DEBUG_OFF)
 {
   const auto test_case = [](const std::string &param)
   {

+ 1 - 1
tests/include/igl/upsample.cpp

@@ -27,7 +27,7 @@ TEST_CASE("upsample: single_triangle", "[igl]")
   test_common::assert_eq(NV_groundtruth,NV);
 }
 
-TEST_CASE("upsample: V_comes_first_F_ordering", "[igl]")
+TEST_CASE("upsample: V_comes_first_F_ordering", "[igl]" IGL_DEBUG_OFF)
 {
   const auto test_case = [](const std::string &param)
   {

+ 7 - 1
tests/test_common.h

@@ -2,7 +2,7 @@
 
 
 // These are not directly used but would otherwise be included in most files.
-// Leaving them included here. 
+// Leaving them included here.
 #include <igl/read_triangle_mesh.h>
 #include <igl/readDMAT.h>
 
@@ -17,6 +17,12 @@
 #include <algorithm>
 #include <tuple>
 
+#ifdef NDEBUG
+#define IGL_DEBUG_OFF ""
+#else
+#define IGL_DEBUG_OFF "[!hide]"
+#endif
+
 namespace test_common
 {
   template<typename Param, typename Fun>