0

I would like to use a CMakeLists.txt file to generate a Makefile with specific custom commands to use them in a terminal like this :

$> make command1 ... $> make command2 ...

I have looked for add_custom_command but I don't want to generate an output file when I'm running a command. I also heard about CMake functions but I'm not sure we can use them in a terminal, unless I missed something.

So, what is the best way to properly add a custom command in the generated Makefile by using CMake ?

Sunchock
  • 361
  • 4
  • 14
  • [add_custom_target](https://cmake.org/cmake/help/latest/command/add_custom_target.html) adds a target with no output, so it will always be built. – Chin Huang Jul 09 '18 at 15:10
  • I knew this option too but I would like have a command who it can be used without the building step – Sunchock Jul 10 '18 at 08:21

0 Answers0