On Wed, Sep 16, 2015 at 11:44 PM, Petr Bena <[email protected]> wrote:
> I would prefer a way to get cmake to generate solution files for MSVC
> in a way that these options are enabled by default. Right now I need
> to do this by hand and when I run cmake again, it overwrites the
> solution files I modified and restore back the settings that disallow
> the multithreaded builds. Basically I would like to know if there is
> some option I would add to CMakeLists.txt that would make it do so. I
> understand that this may not possible with current version of CMake
> though.


I sort of don't see this as being CMake's problem.  Suppose your
computer has 4 cores.  Do you mean you would like CMake to detect that
there are 4 cores and to change the Makefile automatically?  Someone
showed this with two Makefiles [1] -- it's an interesting solution if
you want to try to make the same pair of Makefiles with CMake.  (I
have no idea how, but I guess it's possible?)

I don't know what is the Windows equivalent, but on Linux, I've
aliased "make" to "make -j 4".  So, what you describe about "solution
files" generated by CMake that get overwritten isn't really an issue.

Or maybe I've completely misunderstood you?  Do you want CMake to
detect the number of threads and then to pass that to (a) the program
that would be generated [i.e., for its execution] or (b) the
compilation of such a program?  I've assumed you meant (b)...

Ray

[1]  
http://stackoverflow.com/questions/2527496/how-can-i-write-a-makefile-to-auto-detect-and-parallelize-the-build-with-gnu-mak
-- 

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 via email to