Skip to content

Commit

Permalink
- use compiler version for MSVC
Browse files Browse the repository at this point in the history
Signed-off-by: SSE4 <[email protected]>
  • Loading branch information
SSE4 committed Mar 12, 2020
1 parent c11d9e6 commit 1de7d1f
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions recipes/boost/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -730,8 +730,8 @@ def create_library_config(name):
includes=self._python_includes,
libraries=self._python_libraries)

# Specify here the toolset with the binary if present if don't empty parameter : :
contents += '\nusing "%s" : : ' % self._toolset
# Specify here the toolset with the binary if present if don't empty parameter :
contents += '\nusing "%s" : %s : ' % (self._toolset, self._toolset_version)
contents += ' %s' % self._cxx.replace("\\", "/")

if tools.is_apple_os(self.settings.os):
Expand Down Expand Up @@ -760,6 +760,18 @@ def create_library_config(name):
filename = "%s/user-config.jam" % folder
tools.save(filename, contents)

@property
def _toolset_version(self):
if self._is_msvc:
compiler_version = str(self.settings.compiler.version)
if Version(compiler_version) >= "16":
return "14.2"
elif Version(compiler_version) >= "15":
return "14.1"
else:
return "%s.0" % compiler_version
return ""

@property
def _toolset(self):
compiler = str(self.settings.compiler)
Expand Down

0 comments on commit 1de7d1f

Please sign in to comment.