optimad / bitpit

Open source library for scientific HPC
http://optimad.github.io/bitpit/
GNU Lesser General Public License v3.0
115 stars 34 forks source link

cmake: add support for compiling bitpit with MSVC #447

Closed andrea-iob closed 4 months ago

andrea-iob commented 4 months ago

Add support form compiling bitpit with MSVC.

andrea-iob commented 4 months ago

When debug is on, only compilation is performed. It seems the CI machine doesn't have the needed libraries to allow running the tests in debug mode.

There are still two warnings that should be fixed. One in PABLO and one in VolOctree mapper. Since the fixes seem simple but not trivial (it's not enough to add a static_cast like I did for most of the warinings raised by MSVC), I ask @edoardolombardi and @marcocisternino if they can help me with them.

2024-02-19T11:13:17.8290055Z        "C:\bitpit\actions-runner\_work\bitpit\bitpit\build\INSTALL.vcxproj" (destinazione predefinita) (1) ->
2024-02-19T11:13:17.8291936Z        "C:\bitpit\actions-runner\_work\bitpit\bitpit\build\ALL_BUILD.vcxproj" (destinazione predefinita) (3) ->
2024-02-19T11:13:17.8294055Z        "C:\bitpit\actions-runner\_work\bitpit\bitpit\build\src\voloctree\VOLOCTREE_TARGET_OBJECT.vcxproj" (destinazione predefinita) (21) ->
2024-02-19T11:13:17.8297487Z          C:\bitpit\actions-runner\_work\bitpit\bitpit\src\voloctree\voloctree_mapper.cpp(1267,35): warning C4244: 'initializing': conversion from 'uint64_t' to 'long', possible loss of data [C:\bitpit\actions-runner\_work\bitpit\bitpit\build\src\voloctree\VOLOCTREE_TARGET_OBJECT.vcxproj]
2024-02-19T11:13:17.8299726Z 
2024-02-19T11:13:17.8299885Z 
2024-02-19T11:13:17.8300915Z        "C:\bitpit\actions-runner\_work\bitpit\bitpit\build\INSTALL.vcxproj" (destinazione predefinita) (1) ->
2024-02-19T11:13:17.8302777Z        "C:\bitpit\actions-runner\_work\bitpit\bitpit\build\ALL_BUILD.vcxproj" (destinazione predefinita) (3) ->
2024-02-19T11:13:17.8305328Z        "C:\bitpit\actions-runner\_work\bitpit\bitpit\build\src\PABLO\PABLO_TARGET_OBJECT.vcxproj" (destinazione predefinita) (7) ->
2024-02-19T11:13:17.8308598Z          C:\bitpit\actions-runner\_work\bitpit\bitpit\src\PABLO\ParaTree.hpp(810,68): warning C4244: 'argument': conversion from 'uint64_t' to 'const uint32_t', possible loss of data [C:\bitpit\actions-runner\_work\bitpit\bitpit\build\src\PABLO\PABLO_TARGET_OBJECT.vcxproj]
edoardolombardi commented 4 months ago

This commit looks unrelated and it introduces changes in the API usage https://github.com/optimad/bitpit/pull/447/commits/057fa2d6575d09587b5d9b8958f4a14a00d19feb. If not needed for functional purposes, please, exclude it from the pull request.

andrea-iob commented 4 months ago

This commit looks unrelated and it introduces changes in the API usage 057fa2d. If not needed for functional purposes, please, exclude it from the pull request.

It's needed because there is a windows include that defines a macro named ERROR.

andrea-iob commented 4 months ago

I fixed a problem introduced by commit 5eb85b2df8.