Conan: CPU Count introduction breaks VS 9

Created on 5 Dec 2017  路  3Comments  路  Source: conan-io/conan

(Caused by #1965 / #1909 )

When using Visual Studio 9 (2008), devenv does not support a /m switch. This causes VS 9 builds to fail with:

Microsoft (R) Visual Studio Version 9.0.30729.1.
Copyright (C) Microsoft Corp. All rights reserved.

Invalid Command Line. Unknown Switch : m:2.
Use:
devenv  [solutionfile | projectfile | anyfile.ext]  [switches]

... followed by a bunch of help text.

(Interestingly... this actually does not fail the conan build somehow. I intend to file that as a separate issue.) (The conan build succeeds because cmake is not detecting the bad command line report from devenv. I'll file an issue with cmake on this one.)

Probably the feature needs to check VS version before attempting to use this switch. In fact, I can't find the /m switch on https://docs.microsoft.com/en-us/visualstudio/ide/reference/devenv-command-line-switches at all, so I'm not sure what versions support it and what don't.

bug

All 3 comments

It looks like the cause might actually be that cmake is choosing to use devenv for VS 9 but msbuild for others. The /m switch definitely works for msbuild, but is unrecognized for devenv. CMake states that it will use devenv for 7/8/9, and msbuild for 10+.

https://cmake.org/cmake/help/v3.0/variable/CMAKE_MAKE_PROGRAM.html

I've opened a PR, could you try that from sources?
On lasote/conan fork, branch feature/fix_parallel_visual_less_10

Yup, this change appears to be working. Thanks!

Was this page helpful?
0 / 5 - 0 ratings