I know how to create output files and inserts in CMake depending on the type of assembly (release, debug, etc.), but to shorten (re) compile time I would like CMake to create them in different subfolders.
Say I have such a tree
|- CMakeLists.txt
|- build/
|- src/
If I have a debug, release, and relwithdebinfo assembly, I want CMake to automatically create a tree for me like
|- CMakeLists.txt
|- build/
|--- Debug/
|--- Release/
|--- RelWithDebInfo/
|- src/
etc. Is this possible, if so, how can I achieve my goal?
I don’t need answers like "you have to run CMake from different folders", since for a visual studio this will lead to several solutions, etc. I want to be able to run CMake from only one folder and have it handle subfolders on its own.