[CMake] Can multiple make commands be set in BUILD_COMMAND for ExternalProject_Add?

2012-07-04 Thread hce
Hi,

In ExternalProject_Add, BUILD_COMMAND make works fine, but I need to add
multiple make commands. In Linux command line I can type make  make
extra, but how can I set following BUILD_COMMAND for multiple make
commands, it just not working?

BUILD_COMMAND make  make extra
INSTALL_COMMAND make install  make extra-install

Thank you.

Kind regards,

Jupiter

--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Can-multiple-make-commands-be-set-in-BUILD-COMMAND-for-ExternalProject-Add-tp7580744.html
Sent from the CMake mailing list archive at Nabble.com.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Can multiple make commands be set in BUILD_COMMAND for ExternalProject_Add?

2012-07-04 Thread Michael Wild
On 07/04/2012 08:37 AM, hce wrote:
 Hi,
 
 In ExternalProject_Add, BUILD_COMMAND make works fine, but I need to add
 multiple make commands. In Linux command line I can type make  make
 extra, but how can I set following BUILD_COMMAND for multiple make
 commands, it just not working?
 
 BUILD_COMMAND make  make extra
 INSTALL_COMMAND make install  make extra-install
 
 Thank you.
 
 Kind regards,
 
 Jupiter
 

What's wrong with?

BUILD_COMMAND make all extra
INSTALL_COMMAND make install extra-install


HTH

Michael
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Can multiple make commands be set in BUILD_COMMAND for ExternalProject_Add?

2012-07-04 Thread David Cole
On Wed, Jul 4, 2012 at 3:35 AM, Michael Wild them...@gmail.com wrote:
 On 07/04/2012 08:37 AM, hce wrote:
 Hi,

 In ExternalProject_Add, BUILD_COMMAND make works fine, but I need to add
 multiple make commands. In Linux command line I can type make  make
 extra, but how can I set following BUILD_COMMAND for multiple make
 commands, it just not working?

 BUILD_COMMAND make  make extra
 INSTALL_COMMAND make install  make extra-install

 Thank you.

 Kind regards,

 Jupiter


 What's wrong with?

 BUILD_COMMAND make all extra
 INSTALL_COMMAND make install extra-install


 HTH

 Michael
 --

 Powered by www.kitware.com

 Visit other Kitware open-source projects at 
 http://www.kitware.com/opensource/opensource.html

 Please keep messages on-topic and check the CMake FAQ at: 
 http://www.cmake.org/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake


Michael' suggestion is a good one.

But ... to do the equivalent of  in an ExternalProject_Add call,
simply repeat the COMMAND keyword:

Not this:

 BUILD_COMMAND make  make extra
 INSTALL_COMMAND make install  make extra-install

But this:

  BUILD_COMMAND make COMMAND make extra
  INSTALL_COMMAND make install COMMAND make extra-install


Also, if you're going to hard-code make, use $(MAKE) instead so
that the parallel job specification given to the top-level make is
inherited by the child processes too:

  BUILD_COMMAND $(MAKE) COMMAND $(MAKE) extra
  INSTALL_COMMAND $(MAKE) install COMMAND $(MAKE) extra-install


HTH,
David
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Can multiple make commands be set in BUILD_COMMAND for ExternalProject_Add?

2012-07-04 Thread hce
Thanks David and Michael.

Cheers.

Jupiter

--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Can-multiple-make-commands-be-set-in-BUILD-COMMAND-for-ExternalProject-Add-tp7580744p7580763.html
Sent from the CMake mailing list archive at Nabble.com.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake