Re: [CMake] custom build

2016-07-29 Thread Chuck Atkins
Hi Lev, However, the target builds only if I explicitly say 'make foo_sqlite'. So > far > so good. Is there any way I can make it build if I just say 'make'? > See the add_custom_target documentation for the ALL option, https://cmake.org/cmake/help/v3.6/command/add_custom_target.html And, there

Re: [CMake] CMakeRelink.dir fails on make package on Ninja

2016-07-29 Thread Konstantin Tokarev
29.07.2016, 17:36, "Gonzalo" : > On Linux (Kubuntu 16.04) I am trying to pack my program (no cross > compiling), and I am running into the following with the Ninja Generator > and a custom library (that is also built in the project): > > [2/2] Run CPack packaging tool... > CPack: Create package u

[CMake] CMakeRelink.dir fails on make package on Ninja

2016-07-29 Thread Gonzalo
On Linux (Kubuntu 16.04) I am trying to pack my program (no cross compiling), and I am running into the following with the Ninja Generator and a custom library (that is also built in the project): [2/2] Run CPack packaging tool... CPack: Create package using DEB CPack: Install projects CPack: -

Re: [CMake] custom build

2016-07-29 Thread Lev
On Fri, 29 Jul 2016 08:50:13 -0400 Guillaume Dumont wrote: > add_custom_command(OUTPUT foo.sqlite > MAIN_DEPENDENCY > foo.sql COMMAND "cat foo.sql | > sqlite3 -batch foo.sqlite") > > add_custom_target(foo_sqlite > DEPEND

Re: [CMake] custom build

2016-07-29 Thread Lev
On Fri, 29 Jul 2016 08:13:08 -0400 "Elizabeth A. Fischer" wrote: > Did you run "cmake" first before "make"? Yes... thanks. > Have you considered just using "make" instead? The big benefits of > CMake are: > 1. Can find link dependencies, which might be in different places on > different syste

Re: [CMake] custom build

2016-07-29 Thread Guillaume Dumont
As per CMake documentation your custom target should depend on the output of the custom command. So it should look more like this: add_custom_command(OUTPUT foo.sqlite MAIN_DEPENDENCY foo.sql COMMAND "c

[CMake] custom build

2016-07-29 Thread Lev
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