[prev in list] [next in list] [prev in thread] [next in thread]
List: cmake
Subject: Re: [CMake] ExternalProject_Add ALWAYS
From: Kevin Funk <krf () gmx ! de>
Date: 2013-12-01 11:37:32
Message-ID: 7045934.oZXzC4SlhX () kerberos
[Download RAW message or body]
Am Sonntag, 1. Dezember 2013, 10:53:08 schrieb James Turner:
> Hi,
>
> I am trying to force the BUILD step of an ExternalProject_Add target to \
> be run - always. I have found several wiki articles, and references in \
> the archives of this list, to setting an ALWAYS option for the stage I \
> want to force to run each time. The problem is I can't find any \
> documentation on the exact syntax to use - can someone please enlighten \
> me? (This is for a project where the files are on the local disk when the \
> build is run, but may change due to external sync mechanisms - right now \
> the build system never notices this)
>
> I'm guessing it must be something like:
>
> ExternalProject_Add(Foo
> PREFIX ${CMAKE_BINARY_DIR}
> DOWNLOAD_COMMAND "" # no need to download
> BUILD_ALWAYS # <<< but is this correct?
> SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/path/to/foo
> …...
> )
>
> Kind regards,
> James Turner
Heya,
Looks like you need to call ExternalProject_Add_Step() to create a custom \
step for this. This function accepts 'ALWAYS'.
Signature:
ExternalProject_Add_Step(<name> <step>
[COMMAND cmd...]
[COMMENT "text..."]
[DEPENDEES steps...]
[DEPENDERS steps...]
[DEPENDS files...]
[ALWAYS 1]
[WORKING_DIRECTORY dir]
)
See section 'Adding Custom Steps' in:
http://www.kitware.com/media/html/BuildingExternalProjectsWithCMake2.8.html
And then just set the 'DEPENDEES' parameter to build, in order to have it \
run during the build phase.
Greets
--
Kevin Funk
--
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://www.cmake.org/mailman/listinfo/cmake
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic