[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    [CMake] [solved sort of] Re: add_custom_command and re-running command when target in DEPENDS was up
From:       Maciej Mrozowski <reavertm () gmail ! com>
Date:       2016-08-30 23:17:07
Message-ID: 2455459.flHvJjIzLy () liwardyna
[Download RAW message or body]

On poniedziaƂek, 29 sierpnia 2016 23:44:30 CEST you wrote:
> On poniedziaƂek, 29 sierpnia 2016 23:31:59 CEST you wrote:
> > add_custom_command documentation says:
> > 
> > <quote>
> > The DEPENDS option specifies files on which the command depends. If any
> > dependency is an OUTPUT of another custom command in the same directory
> > (CMakeLists.txt file) CMake automatically brings the other custom command
> > into the target in which this command is built.
> 
> One possibly important note I forgot.
> Mentioned add_jar and add_custom_command in my case are NOT in the same
> directory, but I guess it should not matter since I have explicit 'DEPENDS
> generator'?

Strangely enough, it is now sort of solved/worked around, though I still don't 
fully understand why.

I think I placed:

set_source_file_properties(
  ${CMAKE_CURRENT_BINARY_DIR}/generated.cpp
  PROPERTIES OBJECT_DEPENDS ${GENERATOR_PATH}
)

after custom command definition and not before like previously I tried that 
(like it mattered whether it's before or after?) and touching file under $
{GENERATOR_PATH} actually triggers command to be re-run.

Still I would like to know how to make command re-run in better way.

-- 
regards
MM
-- 

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic