From 241fb73357be444aef871728db69a7e698231e1d Mon Sep 17 00:00:00 2001 From: Bastian Rieck Date: Mon, 19 Sep 2016 10:24:22 +0200 Subject: [PATCH] Disabling fairing algorithms for `psalm_cli` This is not the optimal treatment of this issue, but I am not sure how to handle this otherwise for now---I am thinking about removing the fairing algorithms completely... --- FairingAlgorithms/CMakeLists.txt | 15 ++++++++++++--- psalm.cpp | 12 +++++++++++- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/FairingAlgorithms/CMakeLists.txt b/FairingAlgorithms/CMakeLists.txt index cc992cf..ae9039a 100644 --- a/FairingAlgorithms/CMakeLists.txt +++ b/FairingAlgorithms/CMakeLists.txt @@ -1,10 +1,19 @@ SET( FAIRING_ALGORITHMS_SRC - FairingAlgorithm.cpp - CurvatureFlow.cpp + FairingAlgorithm.cpp ) +IF( EXISTS ${Boost_INCLUDE_DIRS}/boost/numeric/bindings/traits/ublas_sparse.hpp) + LIST( APPEND FAIRING_ALGORITHMS_SRC + CurvatureFlow.cpp + ) +ENDIF() + ADD_LIBRARY(FairingAlgorithms SHARED ${FAIRING_ALGORITHMS_SRC}) -TARGET_LINK_LIBRARIES(FairingAlgorithms umfpack) + +# FIXME: This is not optimal +IF( EXISTS ${Boost_INCLUDE_DIRS}/boost/numeric/bindings/traits/ublas_sparse.hpp) + TARGET_LINK_LIBRARIES(FairingAlgorithms umfpack) +ENDIF() # FIXME: Include path should be set by other means INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR} ../external /usr/include/suitesparse) diff --git a/psalm.cpp b/psalm.cpp index 48699c4..134477e 100644 --- a/psalm.cpp +++ b/psalm.cpp @@ -26,7 +26,12 @@ #include "SubdivisionAlgorithms/Loop.h" #include "SubdivisionAlgorithms/Liepa.h" -#include "FairingAlgorithms/CurvatureFlow.h" +#include "FairingAlgorithms/FairingAlgorithm.h" + +// FIXME: This should be conditional +#if 0 + #include "FairingAlgorithms/CurvatureFlow.h" +#endif #include "mesh.h" @@ -311,7 +316,12 @@ int main(int argc, char* argv[]) // As there is currently only _one_ fairing algorithm, there is really // not much choice here if(vm.count("fair")) + { +// FIXME: Should be conditionally disabled... +#if 0 fairing_algorithm = new psalm::CurvatureFlow(); +#endif + } // We use this instance to create an instance of a subdivision // algorithm class. Further class parameters are set _afterwards_,