Is CMAKE_EXE_LINKER_FLAGS_<CONFIG>_INIT supposed to work for user-defined configuration types?

I define a few of my own build configurations via CMAKE_CONFIGURATION_TYPES. One of these is called NoOpt.

I set this before the first call to project(), and I use a toolchain file. In the toolchain file I then do:


After the project call returns, I print the value of CMAKE_EXE_LINKER_FLAGS_NOOPT and it is empty.

Is this a bug in CMake or am I doing something wrong? Strangely, I have another CMake build configuration called Optimized, and this one works.

It seems like the problem is here: CMake/CMakeInitializeConfigs.cmake at master · Kitware/CMake · GitHub

This does not respect the value of CMAKE_CONFIGURATION_TYPES. I’ll file a bug with this information.

I see this issue here:

Yes that’s the issue I filed, sorry I should have followed up myself with a link.