Skip to content

Add condition to CMP0148 cmake_policy - #135

Merged
ppisar merged 2 commits into
rpm-software-management:masterfrom
Odilhao:fix-cmake-el-cmp0148
Oct 14, 2025
Merged

ppisar merged 2 commits into
rpm-software-management:masterfrom
Odilhao:fix-cmake-el-cmp0148

Conversation

@Odilhao

@Odilhao Odilhao commented Sep 12, 2025

Copy link
Copy Markdown
Contributor

The introduction of #119 make it hard to not say impossible to build libcomps 0.1.23 without having to manually patch the libcomps/CMakeLists.txt file on CS9, on CentosStream9 we have cmake 3.26.5, this version does not support CPM0148.

Without this patch we get the following error:

      Not searching for unused variables given on the command line.
      -- The C compiler identification is GNU 11.5.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /usr/bin/cc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      CMake Error at CMakeLists.txt:4 (cmake_policy):
        Policy "CMP0148" is not known to this version of CMake.
      -- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11")
      -- Found LibXml2: /usr/lib64/libxml2.so (found version "2.9.13")
      -- Found EXPAT: /usr/lib64/libexpat.so (found version "2.5.0")
      /libcomps/libcomps/src/python/src
      -- Configuring incomplete, errors occurred!
      Traceback (most recent call last):
        File "/tmp/pip-build-env-t0500zkt/overlay/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 660, in setup
          env = cmkr.configure(
        File "/tmp/pip-build-env-t0500zkt/overlay/lib/python3.9/site-packages/skbuild/cmaker.py", line 354, in configure
          raise SKBuildError(msg)
      An error occurred while configuring with CMake.

@ppisar ppisar self-assigned this Oct 13, 2025

@ppisar ppisar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch. It looks good. Could you please correct the indentation?

Comment thread libcomps/CMakeLists.txt Outdated
@ppisar
ppisar force-pushed the fix-cmake-el-cmp0148 branch from 8a71b2d to 3e6bd14 Compare October 14, 2025 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants