With cmake, how would you disable in-source builds?

后端 未结 8 1409
说谎
说谎 2020-12-28 12:21

I want to disallow people from cluttering our source tree with generated CMake files... and, more importantly, disallow them from stepping on existing Makefiles

8条回答
  •  遥遥无期
    2020-12-28 12:36

    I think I like your way. The cmake mailing list does a good job at answering these types of questions.

    As a side note: you could create a "cmake" executable file in the directory which fails. Depending on whether or not "." is in their path (on linux). You could even symlink /bin/false.

    In windows, I am not sure if a file in your current directory is found first or not.

提交回复
热议问题