[CMake] VS2012 builds using v3.1.0 are a lot slower than v2.8.12
Yves Frederix
yves.frederix+cmake at gmail.com
Fri Jan 16 05:24:17 EST 2015
<snip>
> Are you building the same configuration in both cases?
> Use
>
> cmake --build . --config Debug
>
> or
>
> cmake --build . --config Release
Yes, I used "--config Release" in both cases.
>
> to specify the configuration. You could also compare the .vcxproj
> files that are generated.
I had a look at the vcxproj files. There were some differences, but
nothing that might explain the observed behavior I think.
However, I did run some additional tests. The project I am working on
is quite large, so I reduced the number of project files in the
solution file. The following shows timings for a solution with 3
project files called "Crypto", "Crypto_s" and "Crypto_test" (the
latter depends on Crypto_s, but when it is built, Crypto_s is already
up-to-date).
3.1.0:
ALL Crypto Crypto_s Crypto_test
real 0m38.211s 0m14.023s 0m7.003s 0m14.691s
2.8.12:
ALL Crypto Crypto_s Crypto_test
real 0m27.230s 0m17.110s 0m10.231s 0m18.618s
Or in other words, for building individual projects, a build with
3.1.0 is always faster than 2.8.12. On the other hand, for the 'ALL'
target 2.8.12 is significantly faster.
This made me wonder if it maybe had to do with default settings for
parallelization in the builds. So I tried, and if I explicitly "set
CL=/MP" for the 3.1.0 build, build time reduces from 38 seconds to 24
seconds which is what I would expect. Could this be the cause and was
there a change in default settings?
Regards,
Yves
>
> Thanks,
> -Brad
>
More information about the CMake
mailing list