0

I have a cmake project with the typical build folder setup. I would like to instruct cmake to append this line anywhere into its generated Makefile:

../make_include/my_stuff.defs

I imagine I could tail this onto the Makefile myself, but I feel like that would cause it to continually be marked as dirty and rebuild. Any help here?

I have seen solutions (How to get CMake to use existing Makefile?) which use an external project command but I would like something more simple / dumb then that.

bobbogo
  • 14,989
  • 3
  • 48
  • 57
benathon
  • 7,455
  • 2
  • 41
  • 70
  • 1
    In CMake you cannot use low-level Makefile features, like defining and using makefile variables. The same is true for including make scripts into generated Makefiles. If some part of your project already has a makefile-based builder, it is simpler to use external project for it. – Tsyvarev Dec 18 '17 at 08:08
  • I undestand, but if I can simply include this file, then I can merge my own commands as long as I make sure there is no conflict. This seems way more simple to me. – benathon Dec 22 '17 at 23:43

0 Answers0