Using CMake to generate Visual Studio C++ project files

前端 未结 8 1350
花落未央
花落未央 2020-12-02 05:48

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

相关标签:
8条回答
  • 2020-12-02 06:18

    I've started my own project, called syncProj. Documentation / download links from here:

    https://docs.google.com/document/d/1C1YrbFUVpTBXajbtrC62aXru2om6dy5rClyknBj5zHU/edit# https://sourceforge.net/projects/syncproj/

    If you're planning to use Visual studio for development, and currently only C++ is supported.

    Main advantage compared to other make systems is that you can actually debug your script, as it's C# based.

    If you're not familiar with syncProj, you can just convert your solution / project to .cs script, and continue further development from that point on.

    In cmake you will need to write everything from scratch.

    0 讨论(0)
  • 2020-12-02 06:19

    CMake produces Visual Studio Projects and Solutions seamlessly. You can even produce projects/solutions for different Visual Studio versions without making any changes to the CMake files.

    Adding and removing source files is just a matter of modifying the CMakeLists.txt which has the list of source files and regenerating the projects/solutions. There is even a globbing function to find all the sources in a directory (though it should be used with caution).

    The following link explains CMake and Visual Studio specific behavior very well.

    CMake and Visual Studio

    0 讨论(0)
提交回复
热议问题