diff --git a/.vs/CMake Overview b/.vs/CMake Overview new file mode 100644 index 0000000..e69de29 diff --git a/.vs/ProjectSettings.json b/.vs/ProjectSettings.json new file mode 100644 index 0000000..940645c --- /dev/null +++ b/.vs/ProjectSettings.json @@ -0,0 +1,3 @@ +{ + "CurrentProjectSetting": "x64-Debug" +} \ No newline at end of file diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 0000000..548c060 --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,14 @@ +{ + "OutputFoldersPerTargetSystem": { + "Local Machine": [ + "out\\build\\x64-Debug", + "out\\install\\x64-Debug" + ] + }, + "ExpandedNodes": [ + "", + "\\oceanmesh", + "\\tests" + ], + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/.vs/cmake.db b/.vs/cmake.db new file mode 100644 index 0000000..e352598 Binary files /dev/null and b/.vs/cmake.db differ diff --git a/.vs/oceanmesh/FileContentIndex/072e7855-37d7-419b-800a-c772bf289688.vsidx b/.vs/oceanmesh/FileContentIndex/072e7855-37d7-419b-800a-c772bf289688.vsidx new file mode 100644 index 0000000..16600a0 Binary files /dev/null and b/.vs/oceanmesh/FileContentIndex/072e7855-37d7-419b-800a-c772bf289688.vsidx differ diff --git a/.vs/oceanmesh/FileContentIndex/37050fe7-00dd-4b1e-a2fa-ddbdf750b1af.vsidx b/.vs/oceanmesh/FileContentIndex/37050fe7-00dd-4b1e-a2fa-ddbdf750b1af.vsidx new file mode 100644 index 0000000..b59a7a6 Binary files /dev/null and b/.vs/oceanmesh/FileContentIndex/37050fe7-00dd-4b1e-a2fa-ddbdf750b1af.vsidx differ diff --git a/.vs/oceanmesh/FileContentIndex/534fbc8e-032a-4438-bcbb-f48ecb7734c0.vsidx b/.vs/oceanmesh/FileContentIndex/534fbc8e-032a-4438-bcbb-f48ecb7734c0.vsidx new file mode 100644 index 0000000..70aef67 Binary files /dev/null and b/.vs/oceanmesh/FileContentIndex/534fbc8e-032a-4438-bcbb-f48ecb7734c0.vsidx differ diff --git a/.vs/oceanmesh/FileContentIndex/752e8e2d-e044-46b4-9010-f140fb50d31b.vsidx b/.vs/oceanmesh/FileContentIndex/752e8e2d-e044-46b4-9010-f140fb50d31b.vsidx new file mode 100644 index 0000000..b184538 Binary files /dev/null and b/.vs/oceanmesh/FileContentIndex/752e8e2d-e044-46b4-9010-f140fb50d31b.vsidx differ diff --git a/.vs/oceanmesh/FileContentIndex/a557c517-6a4f-4771-9a48-25bbf11061e9.vsidx b/.vs/oceanmesh/FileContentIndex/a557c517-6a4f-4771-9a48-25bbf11061e9.vsidx new file mode 100644 index 0000000..7abb10f Binary files /dev/null and b/.vs/oceanmesh/FileContentIndex/a557c517-6a4f-4771-9a48-25bbf11061e9.vsidx differ diff --git a/.vs/oceanmesh/config/applicationhost.config b/.vs/oceanmesh/config/applicationhost.config new file mode 100644 index 0000000..9948aa7 --- /dev/null +++ b/.vs/oceanmesh/config/applicationhost.config @@ -0,0 +1,1016 @@ + + + + + + + +
+
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.vs/oceanmesh/v17/.wsuo b/.vs/oceanmesh/v17/.wsuo new file mode 100644 index 0000000..170970f Binary files /dev/null and b/.vs/oceanmesh/v17/.wsuo differ diff --git a/.vs/oceanmesh/v17/Browse.VC.db b/.vs/oceanmesh/v17/Browse.VC.db new file mode 100644 index 0000000..88bbabd Binary files /dev/null and b/.vs/oceanmesh/v17/Browse.VC.db differ diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite new file mode 100644 index 0000000..52fc18c Binary files /dev/null and b/.vs/slnx.sqlite differ diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..64288d3 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,18 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Oceanmesh", + "type": "debugpy", + "request": "launch", + "program": "${file}", + "console": "integratedTerminal", + "subProcess": true, + "justMyCode": false + } + ], + +} \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a68643..0215e5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,4 @@ cmake_minimum_required(VERSION 2.8.12) - project(oceanmesh) ############################################################################## @@ -7,13 +6,17 @@ project(oceanmesh) # Add custom CMake modules set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) + # Some screen output message(STATUS "OS detected: ${CMAKE_SYSTEM_NAME}") message(STATUS "CXX Compiler detected: ${CMAKE_CXX_COMPILER_ID}") message(STATUS "CMake additional search path for libraries: ${CMAKE_LIBRARY_PATH}") # CGAL and its components +set(CGAL_DISABLE_GMP ON) find_package(CGAL) + +# target_link_libraries(main PRIVATE CGAL::CGAL) message(STATUS "CGAL version: ${CGAL_VERSION}") if( CGAL_VERSION VERSION_LESS 5.0) diff --git a/CMakeSettings.json b/CMakeSettings.json new file mode 100644 index 0000000..a9c794a --- /dev/null +++ b/CMakeSettings.json @@ -0,0 +1,15 @@ +{ + "configurations": [ + { + "name": "x64-Debug", + "generator": "Ninja", + "configurationType": "Debug", + "inheritEnvironments": [ "msvc_x64_x64" ], + "buildRoot": "${projectDir}\\out\\build\\${name}", + "installRoot": "${projectDir}\\out\\install\\${name}", + "cmakeCommandArgs": "", + "buildCommandArgs": "", + "ctestCommandArgs": "" + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md index 8451919..1610134 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ If you have a different Python distribution, or if you do not want to use packag 1. Obtain binary wheels for your python distribution for the latest GDAL, Fiona, and Rasterio (https://www.lfd.uci.edu/~gohlke/pythonlibs). 2. Create a new virtual environment and activate it. 3. Execute: cmd.exe /C "for %f in (GDAL\*.whl Fiona\*.whl rasterio\*.whl) do pip install %f" -4. Execute: pip install geopandas rasterio scikit-fmm pybind11 +4. Execute: pip install geopandas rasterio scikit-fmm pybind11 cython 5. Execute: python setup.py install :warning: diff --git a/install_cgal.bat b/install_cgal.bat index df3b7bf..3ee54f6 100644 --- a/install_cgal.bat +++ b/install_cgal.bat @@ -48,6 +48,8 @@ REM set INSTALL_DIR=%USERPROFILE%\OceanMesh if not exist "%INSTALL_DIR%" mkdir "%INSTALL_DIR%" +set CGAL_PORT="%CD%\ports" + pushd "%INSTALL_DIR%" set LOG=%INSTALL_DIR%\build.log @@ -70,18 +72,13 @@ pushd "%INSTALL_DIR%" vcpkg upgrade --no-dry-run ) echo building cgal... this generally takes several minutes. - vcpkg install cgal:x64-windows > "%LOG%" + vcpkg install cgal:x64-windows --overlay-ports=%CGAL_PORT% popd popd - + set BIN_DIR=%INSTALL_DIR%\vcpkg\installed\x64-windows\bin -if not exist "%BIN_DIR%\gmp.dll" ( - echo build has failed or is incomplete... see "%LOG%". - goto FAIL -) - REM permanently set environment variable to location of DLLs REM echo build seems to have succeeded. diff --git a/install_oceanmesh.bat b/install_oceanmesh.bat index 8367942..be05f9e 100644 --- a/install_oceanmesh.bat +++ b/install_oceanmesh.bat @@ -27,7 +27,7 @@ call conda create --name %ENV% call conda activate %ENV% echo installing OceanMesh conda packages -call conda install -c conda-forge geopandas rasterio scikit-fmm pybind11 +call conda install -c conda-forge geopandas rasterio scikit-fmm pybind11 cython echo Installing OceanMesh package python setup.py install diff --git a/oceanmesh/.vs/oceanmesh/v17/.wsuo b/oceanmesh/.vs/oceanmesh/v17/.wsuo new file mode 100644 index 0000000..21fe788 Binary files /dev/null and b/oceanmesh/.vs/oceanmesh/v17/.wsuo differ diff --git a/oceanmesh/.vs/slnx.sqlite b/oceanmesh/.vs/slnx.sqlite new file mode 100644 index 0000000..0531187 Binary files /dev/null and b/oceanmesh/.vs/slnx.sqlite differ diff --git a/package.bat b/package.bat new file mode 100644 index 0000000..6c716c2 --- /dev/null +++ b/package.bat @@ -0,0 +1,35 @@ +@echo off +setlocal + +REM run package command for vcpkg +REM +if "%~2" EQU "" goto USAGE + +set OPT=--overlay-ports="%CD%\ports" +set VCP=%CD%\vcpkg + +if "%1" EQU "remove" ( + pushd "%VCP%" + vcpkg remove %~2:x64-windows %OPT% --recurse + popd +) else if "%1" EQU "install" ( + pushd "%VCP%" + vcpkg install %~2:x64-windows %OPT% --binarysource=clear + popd + if not exist "%VCP%\installed\x64-windows\share\%~2" ( + echo package install command likely failed for %~2 + GOTO FAIL + ) +) else ( + goto USAGE +) + + +:SUCCESS +exit /b 0 + +:USAGE +echo Usage: package install^|remove packagename + +:FAIL +exit /b 1 diff --git a/ports/.vs/VSWorkspaceState.json b/ports/.vs/VSWorkspaceState.json new file mode 100644 index 0000000..d085cb2 --- /dev/null +++ b/ports/.vs/VSWorkspaceState.json @@ -0,0 +1,8 @@ +{ + "ExpandedNodes": [ + "", + "\\cgal" + ], + "SelectedNode": "\\cgal\\usage", + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/ports/.vs/ports/FileContentIndex/8e0627eb-89c0-4a0c-a5e5-0d68115a8550.vsidx b/ports/.vs/ports/FileContentIndex/8e0627eb-89c0-4a0c-a5e5-0d68115a8550.vsidx new file mode 100644 index 0000000..52b13cc Binary files /dev/null and b/ports/.vs/ports/FileContentIndex/8e0627eb-89c0-4a0c-a5e5-0d68115a8550.vsidx differ diff --git a/ports/.vs/ports/v17/.wsuo b/ports/.vs/ports/v17/.wsuo new file mode 100644 index 0000000..3e0fda2 Binary files /dev/null and b/ports/.vs/ports/v17/.wsuo differ diff --git a/ports/.vs/slnx.sqlite b/ports/.vs/slnx.sqlite new file mode 100644 index 0000000..474f222 Binary files /dev/null and b/ports/.vs/slnx.sqlite differ diff --git a/ports/cgal/_ss/portfile.cmake b/ports/cgal/_ss/portfile.cmake new file mode 100644 index 0000000..5ceb157 --- /dev/null +++ b/ports/cgal/_ss/portfile.cmake @@ -0,0 +1,67 @@ +# Header only +vcpkg_buildpath_length_warning(37) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO CGAL/cgal + REF v5.6 + SHA512 87817169f49c30d8dc4fa5e61ce9b28be5b1f0a9fcd3ebe0cb08b044631a2455de76c53d3cffaa1984f033f5fe21c9b55f54628fc431b7d3a34b3b3e18ad206d + HEAD_REF master + PATCHES + x86_windows.patch + # Upstream patch: https://github.com/CGAL/cgal/pull/7635 +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + qt WITH_CGAL_Qt5 +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DCGAL_HEADER_ONLY=ON + -DCGAL_INSTALL_CMAKE_DIR=share/cgal + -DBUILD_TESTING=OFF + -DBUILD_DOC=OFF + -DCGAL_BUILD_THREE_DOC=OFF + ${FEATURE_OPTIONS} + MAYBE_UNUSED_VARIABLES + CGAL_BUILD_THREE_DOC + CGAL_HEADER_ONLY + WITH_CGAL_Qt5 +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup() + +vcpkg_copy_pdbs() + +# Clean +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") +else() + foreach(ROOT "${CURRENT_PACKAGES_DIR}/bin") + file(REMOVE + "${ROOT}/cgal_create_CMakeLists" + "${ROOT}/cgal_create_cmake_script" + "${ROOT}/cgal_make_macosx_app" + ) + endforeach() +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc" "${CURRENT_PACKAGES_DIR}/share/man") + +set(LICENSES + "${SOURCE_PATH}/Installation/LICENSE" + "${SOURCE_PATH}/Installation/LICENSE.BSL" + "${SOURCE_PATH}/Installation/LICENSE.RFL" + "${SOURCE_PATH}/Installation/LICENSE.GPL" + "${SOURCE_PATH}/Installation/LICENSE.LGPL" +) + +vcpkg_install_copyright(FILE_LIST ${LICENSES}) + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/cgal/_ss/vcpkg.json b/ports/cgal/_ss/vcpkg.json new file mode 100644 index 0000000..8991538 --- /dev/null +++ b/ports/cgal/_ss/vcpkg.json @@ -0,0 +1,81 @@ +{ + "name": "cgal", + "version": "5.6", + "port-version": 1, + "description": "The Computational Geometry Algorithms Library (CGAL) is a C++ library that aims to provide easy access to efficient and reliable algorithms in computational geometry.", + "homepage": "https://github.com/CGAL/cgal", + "license": "GPL-3.0-or-later AND LGPL-3.0-or-later AND BSL-1.0", + "supports": "!xbox", + "dependencies": [ + "boost-accumulators", + "boost-algorithm", + "boost-bimap", + "boost-callable-traits", + "boost-concept-check", + "boost-container", + "boost-core", + "boost-detail", + "boost-filesystem", + "boost-functional", + "boost-fusion", + "boost-geometry", + "boost-graph", + "boost-heap", + "boost-intrusive", + "boost-iostreams", + "boost-iterator", + "boost-lambda", + "boost-logic", + "boost-math", + "boost-mpl", + "boost-multi-array", + "boost-multi-index", + "boost-multiprecision", + "boost-numeric-conversion", + "boost-optional", + "boost-parameter", + "boost-pool", + "boost-preprocessor", + "boost-property-map", + "boost-property-tree", + "boost-ptr-container", + "boost-random", + "boost-range", + "boost-serialization", + "boost-spirit", + "boost-thread", + "boost-tuple", + "boost-type-traits", + "boost-units", + "boost-utility", + "boost-variant", + "gmp", + "mpfr", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ], + "features": { + "qt": { + "description": "Qt GUI support for CGAL", + "dependencies": [ + "boost-format", + "eigen3", + "qt5-3d", + { + "name": "qt5-base", + "default-features": false + }, + "qt5-script", + "qt5-svg", + "qt5-xmlpatterns" + ] + } + } +} diff --git a/ports/cgal/portfile.cmake b/ports/cgal/portfile.cmake new file mode 100644 index 0000000..17799b1 --- /dev/null +++ b/ports/cgal/portfile.cmake @@ -0,0 +1,63 @@ +# Header only +vcpkg_buildpath_length_warning(37) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO CGAL/cgal + REF v5.6 + SHA512 87817169f49c30d8dc4fa5e61ce9b28be5b1f0a9fcd3ebe0cb08b044631a2455de76c53d3cffaa1984f033f5fe21c9b55f54628fc431b7d3a34b3b3e18ad206d + HEAD_REF master + PATCHES + x86_windows.patch + # Upstream patch: https://github.com/CGAL/cgal/pull/7635 +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DCGAL_DISABLE_GMP=ON + -DCGAL_HEADER_ONLY=ON + -DCGAL_INSTALL_CMAKE_DIR=share/cgal + -DBUILD_TESTING=OFF + -DBUILD_DOC=OFF + -DCGAL_BUILD_THREE_DOC=OFF + -DWITH_CGAL_Qt5=OFF + MAYBE_UNUSED_VARIABLES + CGAL_BUILD_THREE_DOC + CGAL_HEADER_ONLY + WITH_CGAL_Qt5 +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup() + +vcpkg_copy_pdbs() + +# Clean +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") +else() + foreach(ROOT "${CURRENT_PACKAGES_DIR}/bin") + file(REMOVE + "${ROOT}/cgal_create_CMakeLists" + "${ROOT}/cgal_create_cmake_script" + "${ROOT}/cgal_make_macosx_app" + ) + endforeach() +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc" "${CURRENT_PACKAGES_DIR}/share/man") + +set(LICENSES + "${SOURCE_PATH}/Installation/LICENSE" + "${SOURCE_PATH}/Installation/LICENSE.BSL" + "${SOURCE_PATH}/Installation/LICENSE.RFL" + "${SOURCE_PATH}/Installation/LICENSE.GPL" + "${SOURCE_PATH}/Installation/LICENSE.LGPL" +) + +vcpkg_install_copyright(FILE_LIST ${LICENSES}) + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/cgal/usage b/ports/cgal/usage new file mode 100644 index 0000000..9ea12d7 --- /dev/null +++ b/ports/cgal/usage @@ -0,0 +1,5 @@ +The package cgal provides CMake targets: + + find_package(CGAL CONFIG REQUIRED) + target_link_libraries(main PRIVATE CGAL::CGAL) + diff --git a/ports/cgal/vcpkg.json b/ports/cgal/vcpkg.json new file mode 100644 index 0000000..1403daf --- /dev/null +++ b/ports/cgal/vcpkg.json @@ -0,0 +1,62 @@ +{ + "name": "cgal", + "version": "5.6", + "port-version": 1, + "description": "The Computational Geometry Algorithms Library (CGAL) is a C++ library that aims to provide easy access to efficient and reliable algorithms in computational geometry.", + "homepage": "https://github.com/CGAL/cgal", + "license": "GPL-3.0-or-later AND LGPL-3.0-or-later AND BSL-1.0", + "supports": "!xbox", + "dependencies": [ + "boost-accumulators", + "boost-algorithm", + "boost-bimap", + "boost-callable-traits", + "boost-concept-check", + "boost-container", + "boost-core", + "boost-detail", + "boost-filesystem", + "boost-functional", + "boost-fusion", + "boost-geometry", + "boost-graph", + "boost-heap", + "boost-intrusive", + "boost-iostreams", + "boost-iterator", + "boost-lambda", + "boost-logic", + "boost-math", + "boost-mpl", + "boost-multi-array", + "boost-multi-index", + "boost-multiprecision", + "boost-numeric-conversion", + "boost-optional", + "boost-parameter", + "boost-pool", + "boost-preprocessor", + "boost-property-map", + "boost-property-tree", + "boost-ptr-container", + "boost-random", + "boost-range", + "boost-serialization", + "boost-spirit", + "boost-thread", + "boost-tuple", + "boost-type-traits", + "boost-units", + "boost-utility", + "boost-variant", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ] +} diff --git a/ports/cgal/x86_windows.patch b/ports/cgal/x86_windows.patch new file mode 100644 index 0000000..fcb26a6 --- /dev/null +++ b/ports/cgal/x86_windows.patch @@ -0,0 +1,24 @@ +diff --git a/Number_types/include/CGAL/boost_mp.h b/Number_types/include/CGAL/boost_mp.h +index 3dcaadcad21..b98980acbc5 100644 +--- a/Number_types/include/CGAL/boost_mp.h ++++ b/Number_types/include/CGAL/boost_mp.h +@@ -20,8 +20,18 @@ + // easy solution. + // MSVC had trouble with versions <= 1.69: + // https://github.com/boostorg/multiprecision/issues/98 ++// ++// Disable also on Windows 32 bits ++// because CGAL/cpp_float.h assumes _BitScanForward64 is available ++// See https://learn.microsoft.com/en-us/cpp/intrinsics/bitscanforward-bitscanforward64 ++// ++// Disable also with PowerPC processors, with Boost<1.80 because of that bug: ++// https://github.com/boostorg/multiprecision/pull/421 ++// + #if !defined CGAL_DO_NOT_USE_BOOST_MP && \ +- (!defined _MSC_VER || BOOST_VERSION >= 107000) ++ (!defined _MSC_VER || BOOST_VERSION >= 107000) && \ ++ (!defined _WIN32 || defined _WIN64) && \ ++ (BOOST_VERSION >= 108000 || (!defined _ARCH_PPC && !defined _ARCH_PPC64)) + #define CGAL_USE_BOOST_MP 1 + + #include diff --git a/setup.py b/setup.py index a19dafa..b3a7876 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,6 @@ [fi], include_dirs=[f"{vcpkg}/include"], extra_link_args=[f"/LIBPATH:{vcpkg}/lib"], - libraries=["gmp", "mpfr"], ) for fi, loc in zip(files, is_called) ] diff --git a/step02_install_cgal_custom.bat b/step02_install_cgal_custom.bat new file mode 100644 index 0000000..cb8469f --- /dev/null +++ b/step02_install_cgal_custom.bat @@ -0,0 +1,6 @@ +@echo off +setlocal + +call package.bat install cgal + + diff --git a/tests/test_bathymetric_gradient_function.py b/tests/test_bathymetric_gradient_function.py index 0bb0d72..17dbb52 100644 --- a/tests/test_bathymetric_gradient_function.py +++ b/tests/test_bathymetric_gradient_function.py @@ -89,3 +89,5 @@ def test_bathymetric_gradient_function(): print(f"Generating mesh associated with {name_}") edge_length_ = om.enforce_mesh_gradation(edge_length, gradation=0.15) generate_mesh(name_, sdf, edge_length_) + +test_bathymetric_gradient_function() \ No newline at end of file diff --git a/tests/test_mesh_generator_simple.py b/tests/test_mesh_generator_simple.py index 1122022..f915c94 100644 --- a/tests/test_mesh_generator_simple.py +++ b/tests/test_mesh_generator_simple.py @@ -24,4 +24,4 @@ def edge_length(p): bbox=bbox, ) - assert np.isclose(np.sum(simp_vol(points, cells)), 1.0, 0.01) + assert np.isclose(np.sum(simp_vol(points, cells)), 1.0, 0.01) \ No newline at end of file