fluent / cfl

Tiny library for data structures management, call it c:\ floppy
Apache License 2.0
0 stars 6 forks source link

CMakelists.txt: Stop using Make automatic variable #54

Open nikomauno opened 1 month ago

nikomauno commented 1 month ago

CMake Makefile layout generation has changed since version 3.20, ref: https://discourse.cmake.org/t/base-filename-gets-set-to-compiler-depend-ts-after-update-to-cmake-3-20/3075/4

For instance with Yocto framework this approach can lead to QA issue stemming from build host path ending up in generated binary like

ERROR: fluentbit-3.1.9-r0 do_package_qa: QA Issue: File /usr/bin/fluent-bit in package fluentbit contains reference to TMPDIR [buildpaths] ERROR: fluentbit-3.1.9-r0 do_package_qa: Fatal QA errors were found, failing task.

stemming from

  $ strings packages-split/fluentbit/usr/bin/fluent-bit
  ...
  $(subst /yocto/upstream/build/tmp/work/cortexa57-poky-linux/fluentbit/3.1.9/git/,,$(abspath $<))
  ...

--

On related note, I was inspired to open this pull request by feedback from Fluent Bit project maintainer in https://github.com/fluent/fluent-bit/pull/9450#issuecomment-2385353687