Closed cmpute closed 3 years ago
Thanks for your contribution, the deployment on mac and ubuntu OS does not pass
https://travis-ci.org/github/cyang-kth/fmm/jobs/754410565
Boost version: 1.58.0 Boost include path: /usr/include Could not find the following Boost libraries: boost_exception
The reason seems to be introducing the boost exception in the cmake dependency as well as src/util/util.cpp
Is it necessary to add this dependency?
Yes, boost.serialization actually implicitly depends on boost.exception on windows since BOOST_NO_EXCEPTIONS
is defined on MSVC.
If you would like to exclude this dependency, I think I can make the boost.exception dependency only present on windows.
This PR fixes codes that are not compatible with MSVC. After this, one can get rid of the messy cygwin when build on Windows. The instructions for building on Windows are as follows:
- Install MSVC (C++ tools or full Visual Studio set)
- Install CMake and SWIG
- Install vcpkg
- Install dependencies with vcpkg:
vcpkg install gdal boost-geometry boost-graph boost-serialization
- Build with CMake:
cmake .. -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake -DSWIG_EXECUTABLE=[path to swig]
If you want to build x64 version instead of x86, install x64 libraries from vcpkg (such as
vcpkg install gdal:x64-windows
) and select x64 generator with CMake
Hi, I also want to get rid of the messy cygwin environment when build on Windows. Could you provide more detail on the instructions for building with MSVC? For example, what should I do after Step 5 and make it install to the target Python environment so that I can import fmm in a python script. Thanks. @cmpute
You are correct, you need to copy the generated dlls from build directory to python lib path. The idiomatic way is to put the library dlls under <python root>/bin
while put put the generated python binding file under <python root>/lib/site-packages
. This is quite complex for CMake to achieve, so I didn't put the instructions here.
@xingminw might be able to help with this
This PR fixes codes that are not compatible with MSVC. After this, one can get rid of the messy cygwin when build on Windows. The instructions for building on Windows are as follows:
vcpkg install gdal boost-geometry boost-graph boost-serialization
cmake .. -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake -DSWIG_EXECUTABLE=[path to swig]
If you want to build x64 version instead of x86, install x64 libraries from vcpkg (such as
vcpkg install gdal:x64-windows
) and select x64 generator with CMake