-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Rinat M
authored
Jun 25, 2019
1 parent
ad45169
commit e96788d
Showing
1 changed file
with
25 additions
and
20 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 |
---|---|---|
|
@@ -59,28 +59,34 @@ if(NOT ( DEFINED "USE_SYSTEM_${extProjName}" AND "${USE_SYSTEM_${extProjName}}" | |
endif() | ||
endif() | ||
|
||
if(MSVC10) | ||
list(APPEND Boost_b2_Command toolset=msvc-10.0) | ||
elseif(MSVC11) | ||
list(APPEND Boost_b2_Command toolset=msvc-11.0) | ||
elseif(MSVC12) | ||
list(APPEND Boost_b2_Command toolset=msvc-12.0) | ||
elseif(MSVC14) | ||
list(APPEND Boost_b2_Command toolset=msvc-14.0) | ||
elseif(XCODE_VERSION) | ||
list(APPEND Boost_b2_Command toolset=clang) | ||
if(NOT MSVC_VERSION VERSION_LESS 1400 AND MSVC_VERSION VERSION_LESS 1500) | ||
list(APPEND Boost_b2_Command toolset=msvc-8.0) | ||
elseif(NOT MSVC_VERSION VERSION_LESS 1500 AND MSVC_VERSION VERSION_LESS 1600) | ||
list(APPEND Boost_b2_Command toolset=msvc-9.0) | ||
elseif(NOT MSVC_VERSION VERSION_LESS 1600 AND MSVC_VERSION VERSION_LESS 1700) | ||
list(APPEND Boost_b2_Command toolset=msvc-10.0) | ||
elseif(NOT MSVC_VERSION VERSION_LESS 1700 AND MSVC_VERSION VERSION_LESS 1800) | ||
list(APPEND Boost_b2_Command toolset=msvc-11.0) | ||
elseif(NOT MSVC_VERSION VERSION_LESS 1800 AND MSVC_VERSION VERSION_LESS 1900) | ||
list(APPEND Boost_b2_Command toolset=msvc-12.0) | ||
elseif(NOT MSVC_VERSION VERSION_LESS 1900 AND MSVC_VERSION VERSION_LESS 1910) | ||
list(APPEND Boost_b2_Command toolset=msvc-14.0) | ||
elseif(NOT MSVC_VERSION VERSION_LESS 1910 AND MSVC_VERSION VERSION_LESS 1920) | ||
list(APPEND Boost_b2_Command toolset=msvc-14.1) | ||
elseif(ENV{CC}) | ||
This comment has been minimized.
Sorry, something went wrong. |
||
# CMake apprarently puts the full path of the compiler into CC | ||
# The user might specify a non-default gcc compiler through ENV | ||
message(STATUS "ENV{CC}=$ENV{CC}") | ||
get_filename_component( gccToolset "$ENV{CC}" NAME ) | ||
|
||
# see: https://svn.boost.org/trac/boost/ticket/5917 | ||
string(TOLOWER ${gccToolset} gccToolset) | ||
if(gccToolset STREQUAL "cc") | ||
set(gccToolset "gcc") | ||
endif() | ||
list(APPEND Boost_b2_Command toolset=${gccToolset}) | ||
message(STATUS "ENV{CC}=$ENV{CC}") | ||
get_filename_component( gccToolset "$ENV{CC}" NAME ) | ||
|
||
# see: https://svn.boost.org/trac/boost/ticket/5917 | ||
string(TOLOWER ${gccToolset} gccToolset) | ||
if(gccToolset STREQUAL "cc") | ||
set(gccToolset "gcc") | ||
endif() | ||
list(APPEND Boost_b2_Command toolset=${gccToolset}) | ||
else() | ||
message(FATAL_ERROR "Unknown MSVC compiler version [${MSVC_VERSION}]") | ||
endif() | ||
This comment has been minimized.
Sorry, something went wrong.
tashrifbillah
Collaborator
|
||
|
||
if(CMAKE_SIZEOF_VOID_P EQUAL 8) | ||
|
@@ -126,4 +132,3 @@ mark_as_superbuild( | |
LABELS | ||
"FIND_PACKAGE" | ||
) | ||
|
This is a better approach for LESS/GREATER comparison, more concise and easy to read.