Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake Updates, main branch (2024.04.12.) #715

Merged
merged 2 commits into from
Apr 15, 2024

Conversation

krasznaa
Copy link
Member

In order to make fixes similar to acts-project/algebra-plugins#115 for oneAPI 2024.1.0, I wanted to make it more convenient (for me personally...) to build Detray with VSCode. And hence this PR...

  • I switched the project to handle -Werror options in the same way as vecmem and traccc do since a while. I.e. not to activate errors for warnings just in Debug builds, but to activate them using a dedicated CMake cache variable (DETRAY_FAIL_ON_WARNINGS).
  • Introduced some (not entirely exhaustive) set of CMake presets, to make it a bit more convenient to do SYCL builds from VSCode. (With proper warning and error highlighting in the code. 😛)

Unfortunately this just unleashed a wealth of warnings with oneAPI 2024.1.0. 😦

[build] In file included from /home/krasznaa/ATLAS/projects/detray/detray/tests/unit_tests/cpu/utils/bounding_volume.cpp:9:
[build] In file included from /home/krasznaa/ATLAS/projects/detray/detray/core/include/detray/utils/bounding_volume.hpp:13:
[build] In file included from /home/krasznaa/ATLAS/projects/detray/detray/core/include/detray/geometry/mask.hpp:13:
[build] In file included from /home/krasznaa/ATLAS/projects/detray/detray/core/include/detray/geometry/shapes/cuboid3D.hpp:14:
[build] In file included from /home/krasznaa/ATLAS/projects/detray/detray/core/include/detray/geometry/coordinates/cartesian3D.hpp:11:
[build] In file included from /home/krasznaa/ATLAS/projects/detray/detray/core/include/detray/definitions/detail/algebra.hpp:17:
[build] In file included from /home/krasznaa/ATLAS/projects/detray/detray/plugins/algebra/vc/include/detray/plugins/algebra/vc_array_definitions.hpp:11:
[build] In file included from /home/krasznaa/ATLAS/projects/detray/detray/out/build/default-fp32/_deps/algebraplugins-src/frontend/vc_cmath/include/algebra/vc_cmath.hpp:11:
[build] In file included from /home/krasznaa/ATLAS/projects/detray/detray/out/build/default-fp32/_deps/algebraplugins-src/math/cmath/include/algebra/math/cmath.hpp:14:
[build] /home/krasznaa/ATLAS/projects/detray/detray/out/build/default-fp32/_deps/algebraplugins-src/math/cmath/include/algebra/math/impl/cmath_transform3.hpp:83:43: warning: implicit conversion between floating point types of different sizes [-Wimplicit-float-size-conversion]
[build]    83 |     matrix_actor().element(_data, 3, 0) = 0.;
[build]       |                                         ~ ^~
[build] /home/krasznaa/ATLAS/projects/detray/detray/tests/unit_tests/cpu/utils/grids/grid_collection.cpp:73:75: warning: implicit conversion between floating point types of different sizes [-Wimplicit-float-size-conversion]
[build]    72 |     dvector<scalar> bin_edges = {-10, 10., -20., 20., 0.,  120., -5., 5., -15.,
[build]       |                                 ~
[build]    73 |                                  15., 0.,  50.,  -15, 15., -35., 35., 0., 550.};
[build]       |                                                                           ^~~~

etc,

Because of this, I didn't activate the new DETRAY_FAIL_ON_WARNINGS flag in the presets just yet... 🤔

@krasznaa krasznaa added the enhancement New feature or request label Apr 12, 2024
@krasznaa
Copy link
Member Author

I realized while writing the description that I didn't update the CI quite correctly. Will do so in a moment...

@krasznaa krasznaa force-pushed the CMakeUpdates-main-20240412 branch from 5f7030d to af3689c Compare April 12, 2024 13:51
Instead of only using -Werror in debug builds, made its use
configurable through this flag.

At the same time simplified the SYCL build flag configuration
a bit (which current VecMem versions now allow us to do), and
made the CUDA flag configuration just a little more robust.
At the same time updated "some of" the CI configurations to make
use of them.
@krasznaa krasznaa force-pushed the CMakeUpdates-main-20240412 branch from af3689c to 6c3ec24 Compare April 12, 2024 13:51
@krasznaa krasznaa marked this pull request as ready for review April 12, 2024 13:51
@krasznaa krasznaa merged commit 01dba8c into acts-project:main Apr 15, 2024
16 checks passed
@krasznaa krasznaa deleted the CMakeUpdates-main-20240412 branch April 15, 2024 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants