I’m using CMake 4.2.1 on Windows with clang (not clang-cl)
In my project I embed a custom manifest, but -Xlinker /MANIFEST:EMBED is kept added to my link command resulting in duplicate manifest.
I was trying to replace it or to override it with -Xinker /MANIFEST:NO, but it is always gets prepended and not appended
Seems like it’s coming from CMake\share\cmake-4.2\Modules\Platform\Windows-Clang.cmake
at line 93.
Notice the sinister /MANIFEST:EMBED
set(CMAKE_${lang}_LINK_EXECUTABLE
"<CMAKE_${lang}_COMPILER> -nostartfiles -nostdlib <FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> -Xlinker /MANIFEST:EMBED -Xlinker /implib:<TARGET_IMPLIB> -Xlinker /pdb:<TARGET_PDB> -Xlinker /version:<TARGET_VERSION_MAJOR>.<TARGET_VERSION_MINOR> ${CMAKE_GNULD_IMAGE_VERSION} <LINK_LIBRARIES> <MANIFESTS>")
Couldn’t find a way to override it.
If someone knows how to override it, without of course changing CMake itself, that would be helpful.
No issues with clang-cl