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:
set(CMAKE_EXE_LINKER_FLAGS_NOOPT_INIT "/INCREMENTAL")
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.