tags:

views:

39

answers:

1

I'm trying add some implicit rules in CMake that will generate direct dependencies (like .c files from Bison .y files). How is it possible to do that?

+2  A: 

You use custom commands in CMake to do 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

Also, you might want to try the tutorial mentioned in my blog here:

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

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

-Bill

Bill Hoffman