rebuild externalprojects

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

rebuild externalprojects

J Decker
how do I make sure that externalprojects get built if I change a source in one?



--

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 | Threaded
Open this post in threaded view
|

Re: rebuild externalprojects

CMake mailing list
By manually deleting (or touching) the stamp file associated with the
earliest step you need to re-run.

ExternalProject is not for auto-detecting changes to stuff and
minimally re-running build steps. It's for static stuff that doesn't
change much.

Find the "-build" stamp file that's associated with the project
containing the source you changed and delete it.

Then run the build from the top and that one and everything that
depends on it afterwards should rebuild.


HTH,
David C.


On Thu, Sep 21, 2017 at 7:09 AM, J Decker <[hidden email]> wrote:

> how do I make sure that externalprojects get built if I change a source in
> one?
>
>
>
> --
>
> 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
--

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 | Threaded
Open this post in threaded view
|

Re: rebuild externalprojects

Craig Scott-3
In reply to this post by J Decker
You probably want the BUILD_ALWAYS option. Have a look at the overhauled docs for ExternalProject (only available on master at the moment) for a more informative description of the option and the module in general:



On Thu, Sep 21, 2017 at 9:09 PM, J Decker <[hidden email]> wrote:
how do I make sure that externalprojects get built if I change a source in one?



--

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



--
Craig Scott
Melbourne, Australia

--

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 | Threaded
Open this post in threaded view
|

Re: rebuild externalprojects

Nils Gladitz-2
In reply to this post by J Decker
On Thu, Sep 21, 2017 at 1:09 PM, J Decker <[hidden email]> wrote:
how do I make sure that externalprojects get built if I change a source in one?

"BUILD_ALWAYS 1" should always trigger the build of the external project.
This would be required since only the external project's build system will know if something relevant has changed or not.

Nils

--

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 | Threaded
Open this post in threaded view
|

Re: rebuild externalprojects

J Decker
In reply to this post by Craig Scott-3


On Thu, Sep 21, 2017 at 4:21 AM, Craig Scott <[hidden email]> wrote:
You probably want the BUILD_ALWAYS option. Have a look at the overhauled docs for ExternalProject (only available on master at the moment) for a more informative description of the option and the module in general:

Excellent that fixes my issues.  It appears that I'll need to update my required to 3.1... 3.0 didn't have it.

 

On Thu, Sep 21, 2017 at 9:09 PM, J Decker <[hidden email]> wrote:
how do I make sure that externalprojects get built if I change a source in one?



--

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



--
Craig Scott
Melbourne, Australia


--

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 | Threaded
Open this post in threaded view
|

Re: rebuild externalprojects

Alexander Neundorf-3
In reply to this post by CMake mailing list

On 2017 M09 21, Thu 07:18:46 CEST David Cole via CMake wrote:

> By manually deleting (or touching) the stamp file associated with the

> earliest step you need to re-run.

>

> ExternalProject is not for auto-detecting changes to stuff and

> minimally re-running build steps. It's for static stuff that doesn't

> change much.

>

> Find the "-build" stamp file that's associated with the project

> containing the source you changed and delete it.

>

> Then run the build from the top and that one and everything that

> depends on it afterwards should rebuild.

 

so, if I have an "external project" as sources in my project (i.e. it is not updated from some other repository or something), and if then that package is upgraded to the next version, what's the recommended way to enforce a rebuild of it ?

 

I have only found two clunky work-arounds: if it's a cmake-based project, I just add

--no-warn-unused-cli -DREBUILD_FLAG=123

to CMAKE_ARGS, and increase this "REBUILD_FLAG" whenever a rebuild is necessary.

What also seems to work is to misuse the

URL_MD5, and set it to the date of the last update, e.g.

URL_MD5=20171002

 

Alex

 


--

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