CIL icon indicating copy to clipboard operation
CIL copied to clipboard

cilacc: fix openmp linking

Open casperdcl opened this issue 7 months ago • 1 comments

https://github.com/TomographicImaging/CIL/blob/5b151e1fb3a7e6306147feaef7ba2fdd96f05179/src/Core/CMakeLists.txt#L26 is outdated and needs to be replaced by target_link_libraries(cliacc ... OpenMP::OpenMP_CXX) to avoid linking failures on some compilers.

FindOpenMP.cmake version/syntax might be related to #2154.

casperdcl avatar May 08 '25 11:05 casperdcl

see also https://github.com/TomographicImaging/CIL/pull/2145#discussion_r2081042391 which refers to https://github.com/conda-forge/stir-feedstock/blob/main/recipe/build.sh#L34

Though STIR does have conda-forge/stir-feedstock:recipe/meta.yaml:46-47 and funny enough UCL/STIR:src/CMakeLists.txt:137-138.

Meanwhile CIL uses TomographicImaging/CIL:recipe/meta.yaml:50-51 instead.

-- @casperdcl

I'm not sure what conda recommends these days for OpenMP libraries. I do know that the stir-feedstock builds on conda-forge :-).

Regarding the funny STIR lines, that just needs some clean-up. I've created https://github.com/UCL/STIR/issues/1594. feel free to fix it :-)

KrisThielemans avatar May 09 '25 08:05 KrisThielemans