In my code, I set the compile option for a specific target such as
target_compile_options(lib_one PRIVATE "/bigobj")
I initially configure the project to build in Release mode by
-DCMAKE_BUILD_TYPE=Release
However, when I changed the build mode interactively in Visual Studio to Debug, the compile options set for lib_one
is lost because it is not transferred automatically. Is there a command in cmake that serve this purpose?