gavalian / hipo

High Performance Output Data format for experimental Physics
2 stars 9 forks source link

fix: enable `C` language for LZ4 `check_c_source_runs` #28

Closed c-dilks closed 1 year ago

c-dilks commented 1 year ago

It seems that check_c_source_runs needs the C language to be enabled, otherwise I get the following error from meson's dependency resolution:

CMake Error at /usr/share/cmake/Modules/Internal/CheckSourceRuns.cmake:41 (message):
  check_source_runs: C: needs to be enabled before use.
Call Stack (most recent call first):
  /usr/share/cmake/Modules/CheckCSourceRuns.cmake:52 (cmake_check_source_runs)
  /home/dilks/j/install/lib/cmake/hipo4/LZ4Config.cmake:12 (check_c_source_runs)
  /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
  /home/dilks/j/install/lib/cmake/hipo4/hipo4Config.cmake:31 (find_dependency)
  CMakeLists.txt:20 (find_package)

This PR resolves this by enabling C.

Tested with:

Error produced by meson version 1.2.3, with the following usage to find hipo4 (basically this calls find_package(hipo4) and a bit more):

hipo_dep = dependency('hipo4', method: 'cmake')

I don't see the same issue when calling find_package(hipo4) with cmake, so maybe meson is doing some extra stuff...

gavalian commented 1 year ago

Done