Skip to content

Commit

Permalink
Disable boost's variadic templates under MSVC, as they're known buggy…
Browse files Browse the repository at this point in the history
… on some versions.
  • Loading branch information
wrwilliams committed Oct 31, 2016
1 parent 4cffc88 commit e0bff34
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmake/shared.cmake
Expand Up @@ -106,7 +106,7 @@ IF(CMAKE_COMPILER_IS_GNUCC)
ENDIF(CMAKE_COMPILER_IS_GNUCC)

# If we're compiling for unix, cotire only supports Intel, GCC and Clang.
IF (UNIX AND NOT (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")))
IF (UNIX AND NOT ((${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") OR (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") OR (${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")))
set(USE_COTIRE false)
ENDIF()

Expand Down Expand Up @@ -168,3 +168,9 @@ if (NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
"Choose the build type (None, Debug, Release, RelWithDebInfo, MinSizeRel)" FORCE)
endif()

# There are broken versions of MSVC that won't handle variadic templates correctly (despite the C++11 test case passing).
# Just build vanilla versions, boost can handle it.
if (MSVC)
add_definitions(-DBOOST_NO_CXX11_VARIADIC_TEMPLATES)
endif()

0 comments on commit e0bff34

Please sign in to comment.