質問

I have a project which uses Makefiles. On a branch, I have CMake based build system. Now some team-members wants the OLD make-files based system intact, when cmake is added. But this is not possible after cmake . command overwrites the old Makefile.

Now I can easily avoid it if I can tell CMake to generate makefiles with some non-standard names e.g. makefile.cmake etc. Is it possible?

I am open to consider other options as well. In any case, old Makefiles must not be touched.

役に立ちましたか?

解決 2

Cmake creates a build system in the working directory. So create any empty directory, and run cmake <path-to-source> from there.

他のヒント

Unfortunately, the name "Makefile" in hard-coded several times, in the sources of CMake. You cannot change it. As Peter has pointed out in the other answer, that change is not necessary, because CMake support out-of-source builds.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top