79756846

Date: 2025-09-05 13:46:51
Score: 1
Natty:
Report link

CMake 3.24 added Path Transformation generator expressions, so this can now be done with generators:

$<PATH:REMOVE_EXTENSION,$<TARGET_FILE_NAME:${lib}>>

In my case I wanted to change the extension, which is also easy to do now:

$<PATH:REPLACE_EXTENSION,$<TARGET_FILE_NAME:${lib}>,new_extension>
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Dinwiggy