Implicit Rules for CMake

I am trying to add some implicit rules to CMake that will generate direct dependencies (e.g. .c files from Bison.y files). How can I do that?

+3
source share
1 answer

CMake uses custom commands for this. There is a wiki article here: http://www.cmake.org/Wiki/CMake_FAQ#How_can_I_generate_a_source_file_during_the_build.3F

Alternatively, you can try the tutorial mentioned on my blog:

http://www.kitware.com/blog/home/post/7

(See step 5: http://www.cmake.org/cmake/help/cmake_tutorial.html#s5 )

-Bill

+2
source

Source: https://habr.com/ru/post/1732669/


All Articles