Dear cmake users,

Could you please help me how to make cmake to produce a generic build system?

What I want to do is running simple shell command on files. Namely, I want to
generate sqlite database from a sql file. It all works from the command line,
I just can't figure out how to make cmake to do the right thing.

I started to do something like this:

add_custom_target(foo.sqlite foo.sql)

add_custom_command(OUTPUT foo.sqlite
                                                MAIN_DEPENDENCY foo.sql
                                                COMMAND "cat foo.sql | sqlite3 
-batch foo.sqlite")

but it doesn't do anything when I issue "make".

Any help appreciated. 

Levente

-- 
73 de HA5OGL
Op.: Levente
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to