How to tell CMake where to put build files?

前端 未结 1 753
南笙
南笙 2020-11-30 01:20

I want to tell CMake to output files and folders to a different folder instead of the current folder. I\'m talking about the generated files by CMake below:

  • fi
相关标签:
1条回答
  • 2020-11-30 01:48

    You can use the undocumented command line options -B and -H to specify your build directory and source directory respectively. So, from your project's root, you can do:

    cmake -Bbuild -H.
    

    (Where build is your build directory path.)

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