I am working on an open source C++ project, for code that compiles on Linux and Windows. I use CMake to build the code on Linux. For ease of development setup and political
CMake can generate really nice Visual Studio .projs
/.slns
, but there is always the problem with the need to modify the .cmake
files rather than .proj
/.sln
. As it is now, we are dealing with it as follows:
/src
and files visible in Visual Studio are just "links" to them defined in .filter
./src
directory, not the default project's one..cmake
files.At first we were a little afraid of how it will turn out, but the workflow works really well and with nice diff visible before each commit, everyone can easily see if his changes were correctly mapped in .cmake
files.
One more important thing to know about is the lack of support (afaik) for "Solution Configurations" in CMake. As it stands, you have to generate two directories with projects/solutions - one for each build type (debug, release, etc.). There is no direct support for more sophisticated features - in other words: switching between configurations won't give you what you might expect.