I was under the impression that target_link_libraries implicitly mad the
target depend on all mentioned libraries.
Calling the custom command and library build twice during parallel builds
is just wrong. If it's a known problem, it probably requires addressing
at some point.
Does this problem ex
Hello,
On 9/30/13 7:19 PM, Williams, Norman K wrote:
cmake_minimum_required(VERSION 2.8)
project(Test)
add_custom_command(OUTPUT file.c
COMMAND echo "GENERATING FILE"
COMMAND ${CMAKE_COMMAND} -E remove file.c
On Monday 30 September 2013, Jakub Schmidtke wrote:
> The workaround I found so far is to add a custom target that depends on the
> targets I want to build.
> So if I add this:
> add_custom_target(test12 DEPENDS test1 test2)
>
> to my CMake file, and instead of running 'make -j test1 test2' I run
Actually I see the problem now -- it works fine if you build with one job,
but if you run 2 jobs, it for some reason runs the custom command and the
library build command twice.
Which is weird, and probably a bug. Without digging into the generated
Makefiles, it seems like the custom command thro
I don't see the problem you're having.
I re-wrote your CMakeLists.txt slightly to not use Unix commands:
cmake_minimum_required(VERSION 2.8)
project(Test)
add_custom_command(OUTPUT file.c
COMMAND echo "GENERATING FILE"
The workaround I found so far is to add a custom target that depends on the
targets I want to build.
So if I add this:
add_custom_target(test12 DEPENDS test1 test2)
to my CMake file, and instead of running 'make -j test1 test2' I run 'make
-j test12' everything seems to be fine...
On Mon, Sep
Am Montag, 30. September 2013, 12:58:40 schrieb Jakub Schmidtke:
> Hi,
>
> I am trying to get dependencies right in a project that uses auto-generated
> sources.
> I have a library, that uses auto-generated files, and other executables
> that use that library.
> I created a set of CMakeLists.txt f
Hi,
I am trying to get dependencies right in a project that uses auto-generated
sources.
I have a library, that uses auto-generated files, and other executables
that use that library.
I created a set of CMakeLists.txt files that show the problem.
To run it you need test.c and org.c in the source