Skip to content

Conversation

@jtdavis777
Copy link
Collaborator

Fixes #8889

I'm not sure why the STATIC fallback case exists, so removing it.

@fliiiix
Copy link
Contributor

fliiiix commented Jan 7, 2026

I don't know about the MSVC case but i added the second case for old cmake versions here #8173 i think we break cmake older than 3.20.0 (https://github.com/Kitware/CMake/releases/tag/v3.20.0 released 2021)

I guess this will still break older systems like debian bullseye https://packages.debian.org/bullseye/cmake

If we want to do that i would propose to set cmake_minimum_required to 3.20.0

@jtdavis777
Copy link
Collaborator Author

We definitely can't do that -- what specifically breaks in the older versions? Interface libs have been supported since 3.0

@fliiiix
Copy link
Contributor

fliiiix commented Jan 8, 2026

It might be supported since 3.0 but it it started working properly only with 3.20 or something.

cmake ..
CMake Warning at CMake/Version.cmake:35 (message):
  git is not found
Call Stack (most recent call first):
  CMakeLists.txt:5 (include)


-- Proceeding with version: 25.12.19.0
-- The CXX compiler identification is GNU 10.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for strtof_l
-- Looking for strtof_l - found
-- Looking for strtoull_l
-- Looking for strtoull_l - found
-- Looking for realpath
-- Looking for realpath - found
-- CMAKE_CXX_FLAGS: 
CMake Error at CMakeLists.txt:584 (set_target_properties):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "LINKER_LANGUAGE" is not allowed.


CMake Generate step failed.  Build files cannot be regenerated correctly.

To reproduce ->

podman run -it --rm --volume $(pwd):/ws --workdir /ws debian:bullseye

# inside the container
apt update && apt install cmake g++
mkdir build-cmake && cd build-cmake
cmake ..

But it looks like it is already broken right now (using the type STATIC)->

CMake Error at CMakeLists.txt:578 (add_library):
  No SOURCES given to target: flatsample

add_library(flatsample INTERFACE)

# Since flatsample has no sources, we have to explicitly set the linker lang.
set_target_properties(flatsample PROPERTIES LINKER_LANGUAGE CXX)
Copy link
Contributor

@fliiiix fliiiix Jan 8, 2026

Choose a reason for hiding this comment

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

looking at the issue again i would propose to remove this line (578) as well and then it works with old cmake version, no idea about the MSVC case but i prose to fix that later if that still breaks for someone and we understand what the issues is

@jtdavis777
Copy link
Collaborator Author

Yeah the static failure is what was reported in the issue I'm looking to fix. Thanks for the repro steps!!

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.

Cmake error

2 participants