[CMake] Re: call a configure command

Steven Van Ingelgem steven at vaningelgem.be
Sat Dec 22 17:21:11 EST 2007


I solved it with writing out a bash script which checks the existence
of some files to not recompile the external library every time.
after that I just add the add_custom_target because it needed to be
made dependable on some other targets.


Thanks a lot for your hints Rodolfo!
On 12/22/07, Brandon Van Every <bvanevery at gmail.com> wrote:
> On Dec 22, 2007 4:25 PM, Alan W. Irwin <irwin at beluga.phys.uvic.ca> wrote:
> >
> > Note, you don't have to do any of the above with add_custom_command.  In
> > principle, you could also do those external builds with execute_process.
> > The difference, of course, is execute_process runs at CMake time so that
> > solves the issue we discussed before of wx-config from your build of
> > wxwidgets not being available at CMake time for the rest of your build.
>
> This will fail.  execute_process runs in CMake's environment, not your
> build environment.  Same reason we have to write try_compile and
> try_run instead of just doing execute_process.
>
>
> Cheers,
> Brandon Van Every
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>


More information about the CMake mailing list