Makefile equivalent in CMake

后端 未结 2 775
Happy的楠姐
Happy的楠姐 2021-02-14 19:05

I have just started using CMake and it has been less than a week. I have a Makefile written and I am trying to write its equivalent in CMake. I don\'t have an idea about the com

2条回答
  •  鱼传尺愫
    2021-02-14 19:49

    I just converted my project (~15000 lines of C++ code, builds shared libraries, unit tests, and executables) to CMake from scons a couple of weeks ago, and it only took a day or two to do.

    One thing I found helpful was that the Boost project now has experimental support for CMake rather than bjam. Looking through their code (specifically, the macros defined in tools/build/CMake) taught me a lot about some of the syntax and capabilities of CMake.

    Also useful:

    • The official CMake FAQ
    • The online CMake documentation
    • A simple CMake tutorial
    • A quick overview of the language/syntax

    Hope this helps.

提交回复
热议问题