Using CMake to generate Visual Studio C++ project files

前端 未结 8 1392
花落未央
花落未央 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: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

提交回复
热议问题