Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
definition of custom VS version for msvc compiler in MSBuild (#8603)
* definition of custom VS version for msvc compiler in MSBuild * msbuildtoolchain now needs Windows * fix test
- Loading branch information
1 parent
ffd2f3a
commit 0fd3e50
Showing
10 changed files
with
134 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,4 @@ | ||
from .toolchain import MSBuildToolchain | ||
from .msbuild import MSBuild | ||
from .msbuilddeps import MSBuildDeps | ||
|
||
|
||
def msvc_runtime_flag(conanfile): | ||
settings = conanfile.settings | ||
compiler = settings.get_safe("compiler") | ||
runtime = settings.get_safe("compiler.runtime") | ||
if compiler == "Visual Studio": | ||
return runtime | ||
if compiler == "msvc": | ||
runtime_type = settings.get_safe("compiler.runtime_type") | ||
runtime = "MT" if runtime == "static" else "MD" | ||
if runtime_type == "Debug": | ||
runtime = "{}d".format(runtime) | ||
return runtime | ||
from conan.tools.microsoft.toolchain import MSBuildToolchain | ||
from conan.tools.microsoft.msbuild import MSBuild | ||
from conan.tools.microsoft.msbuilddeps import MSBuildDeps | ||
from conan.tools.microsoft.visual import msvc_runtime_flag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters