Changeset View
Changeset View
Standalone View
Standalone View
extern/quadriflow/CMakeLists.txt
- This file was added.
| # ***** BEGIN GPL LICENSE BLOCK ***** | |||||
| # | |||||
brecht: Add license header and suppress warnings:
```
diff --git a/extern/quadriflow/CMakeLists.txt… | |||||
| # This program is free software; you can redistribute it and/or | |||||
Done Inline ActionsPlease make this file similar to e.g. extern/glog/CMakeLists.txt.
brecht: Please make this file similar to e.g. `extern/glog/CMakeLists.txt`.
* Don't check minimum… | |||||
| # modify it under the terms of the GNU General Public License | |||||
| # as published by the Free Software Foundation; either version 2 | |||||
| # of the License, or (at your option) any later version. | |||||
| # | |||||
| # This program is distributed in the hope that it will be useful, | |||||
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | |||||
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||||
Done Inline ActionsI don't think we have moved to c++14 just yet, is 14 absolutely required or will our current baseline of c++11 work? LazyDodo: I don't think we have moved to c++14 just yet, is 14 absolutely required or will our current… | |||||
Done Inline ActionsYes, not having this results in a build error on my end. zeddb: Yes, not having this results in a build error on my end. | |||||
| # GNU General Public License for more details. | |||||
| # | |||||
| # You should have received a copy of the GNU General Public License | |||||
| # along with this program; if not, write to the Free Software Foundation, | |||||
| # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |||||
| # | |||||
Done Inline Actionslowercase configure_file( for consistency brecht: lowercase `configure_file(` for consistency | |||||
| # The Original Code is Copyright (C) 2019, Blender Foundation | |||||
| # All rights reserved. | |||||
| # ***** END GPL LICENSE BLOCK ***** | |||||
Done Inline ActionsMSVC needs to following to get M_PI and friends if (WIN32)
add_definitions(-D_USE_MATH_DEFINES)
endif()LazyDodo: MSVC needs to following to get `M_PI` and friends
```
if (WIN32)
add_definitions… | |||||
| # avoid noisy warnings | |||||
| if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") | |||||
| add_c_flag( | |||||
| "-Wno-unused-result" | |||||
| ) | |||||
| endif() | |||||
| set(CMAKE_CXX_STANDARD 14) | |||||
| set(CMAKE_CXX_STANDARD_REQUIRED ON) | |||||
| if (WIN32) | |||||
| add_definitions(-D_USE_MATH_DEFINES) | |||||
| endif() | |||||
| set(LEMON_3RD_PATH 3rd/lemon-1.3.1) | |||||
Done Inline ActionsBoost and Eigen headers should go to INC_SYS brecht: Boost and Eigen headers should go to `INC_SYS` | |||||
| set(LEMON_SOURCE_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${LEMON_3RD_PATH}) | |||||
| set(LEMON_SRC ${LEMON_SOURCE_ROOT_DIR}/lemon) | |||||
| set(LEMON_INCLUDE_DIRS ${LEMON_SOURCE_ROOT_DIR}) | |||||
| configure_file( | |||||
| ${LEMON_SRC}/config.h.in | |||||
| ${LEMON_SRC}/config.h | |||||
| ) | |||||
| set(LEMON_SOURCES | |||||
| ${LEMON_SRC}/arg_parser.cc | |||||
| ${LEMON_SRC}/base.cc | |||||
| ${LEMON_SRC}/color.cc | |||||
| ${LEMON_SRC}/lp_base.cc | |||||
| ${LEMON_SRC}/lp_skeleton.cc | |||||
| ${LEMON_SRC}/random.cc | |||||
| ${LEMON_SRC}/bits/windows.cc | |||||
| ) | |||||
| set(INC | |||||
| src | |||||
| 3rd/pcg32 | |||||
| 3rd/pss | |||||
| ${LEMON_INCLUDE_DIRS} | |||||
| ) | |||||
| set(INC_SYS | |||||
| ${BOOST_INCLUDE_DIR} | |||||
| ${EIGEN3_INCLUDE_DIRS} | |||||
| ) | |||||
| set(SRC | |||||
| src/adjacent-matrix.cpp | |||||
| src/adjacent-matrix.hpp | |||||
| src/compare-key.hpp | |||||
| src/config.hpp | |||||
| src/dedge.cpp | |||||
Done Inline ActionsRemove the build flag checks and just enable what we use. brecht: Remove the build flag checks and just enable what we use. | |||||
| src/dedge.hpp | |||||
| src/disajoint-tree.hpp | |||||
| src/dset.hpp | |||||
| src/field-math.hpp | |||||
| src/flow.hpp | |||||
| src/hierarchy.cpp | |||||
| src/hierarchy.hpp | |||||
| src/loader.cpp | |||||
| src/loader.hpp | |||||
| src/localsat.cpp | |||||
| src/localsat.hpp | |||||
| src/merge-vertex.cpp | |||||
| src/merge-vertex.hpp | |||||
| src/optimizer.cpp | |||||
| src/optimizer.hpp | |||||
| src/parametrizer.cpp | |||||
| src/parametrizer-flip.cpp | |||||
| src/parametrizer-int.cpp | |||||
| src/parametrizer-mesh.cpp | |||||
| src/parametrizer-scale.cpp | |||||
| src/parametrizer-sing.cpp | |||||
| src/parametrizer.hpp | |||||
| src/serialize.hpp | |||||
| src/subdivide.cpp | |||||
| src/subdivide.hpp | |||||
| ${LEMON_SOURCES} | |||||
| ) | |||||
| set(LIB | |||||
| ) | |||||
| blender_add_lib(extern_quadriflow "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") | |||||
Done Inline ActionsRemove this, it's not needed. brecht: Remove this, it's not needed. | |||||
Done Inline ActionsThis is actually causing a crash on startup here, I guess due to TBB being linked twice. If quadriflow depends on TBB being enabled, it should handle that in setup_liblinks in macros.cmake. brecht: This is actually causing a crash on startup here, I guess due to TBB being linked twice.
If… | |||||
Done Inline ActionsI doesn't depend on it with our build options, so I think I can simply skip linking it. zeddb: I doesn't depend on it with our build options, so I think I can simply skip linking it. | |||||
Done Inline Actions${LEMON_SOURCES} LazyDodo: ${LEMON_SOURCES} | |||||
Add license header and suppress warnings: