Re: [CMake] How to determine or set the order that targets are built

2017-12-28 Thread Don Hinton
Take a look at job pools which are implemented in ninja.

You should be able to setup 2 pools and put the expensive target in one
pool and the rest in the other, which should give you the desired behavior.

  https://cmake.org/cmake/help/latest/prop_gbl/JOB_POOLS.html
  https://ninja-build.org/manual.html#ref_pool

hth...
don

On Thu, Dec 28, 2017 at 2:49 PM, Michael Jackson <
mike.jack...@bluequartz.net> wrote:

> My current project builds a bunch (30) different plugins that do NOT
> depend on each other. One of those plugins has about 200 files of highly
> templated C++ code to build which takes a while to compile and link.
> Meanwhile the other plugins only have about 20-40 files of
> "run-of-the-mill" c++ codes which all compile in a reasonably fast time. Is
> there a way to give a hint to CMake or the build system (Ninja or Visual
> Studio) to start the build of that target before the others? I know about
> the set target dependencies which in a way would solve the problem but I
> would hate to use that since there isn't an actual dependency and it really
> wouldn't work anyways. The link time for this large plugin is on the order
> of minutes on a FAST machine (Core i7 8700k overclocked).
>
> Are the targets treated in lexographical order perhaps if there are no
> dependencies? I would definintely consider renaming the plugin if that
> meant it would kick off earlier.
>
> Any suggestions would be great.
>
> --
> Michael Jackson | Owner, President
>   BlueQuartz Software
> [e] mike.jack...@bluequartz.net
> [w] www.bluequartz.net
>
>
> --
>
> 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:
> https://cmake.org/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:
https://cmake.org/mailman/listinfo/cmake


[CMake] How to determine or set the order that targets are built

2017-12-28 Thread Michael Jackson
My current project builds a bunch (30) different plugins that do NOT depend on 
each other. One of those plugins has about 200 files of highly templated C++ 
code to build which takes a while to compile and link. Meanwhile the other 
plugins only have about 20-40 files of "run-of-the-mill" c++ codes which all 
compile in a reasonably fast time. Is there a way to give a hint to CMake or 
the build system (Ninja or Visual Studio) to start the build of that target 
before the others? I know about the set target dependencies which in a way 
would solve the problem but I would hate to use that since there isn't an 
actual dependency and it really wouldn't work anyways. The link time for this 
large plugin is on the order of minutes on a FAST machine (Core i7 8700k 
overclocked).

Are the targets treated in lexographical order perhaps if there are no 
dependencies? I would definintely consider renaming the plugin if that meant it 
would kick off earlier.

Any suggestions would be great.

--
Michael Jackson | Owner, President
  BlueQuartz Software
[e] mike.jack...@bluequartz.net
[w] www.bluequartz.net


-- 

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:
https://cmake.org/mailman/listinfo/cmake