Verified Commit c8e44abf authored by Silvio Traversaro's avatar Silvio Traversaro Committed by Justin Carpentier
Browse files

Always add /bigobj for compilation units that link pinocchio

Pinocchio with its heavely templated code create a huge number of
sections, and to avoid C1128 errors, the simpler solution is to
always pass /bigobj on MSVC to compilation units that link pinocchio.
The only downside of this approach is that library generates with this
option cannot be linked with linkers shipped with Visual Studio 2005 or
earlier, that I think it is not a problem in practice.
parent 460162f6
......@@ -19,6 +19,10 @@ ADD_LIBRARY(${PROJECT_NAME} SHARED ${HEADERS} ${${PROJECT_NAME}_SOURCES})
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)
TARGET_COMPILE_DEFINITIONS(${PROJECT_NAME} PUBLIC ${CURRENT_COMPILE_DEFINITIONS})
IF(MSVC)
TARGET_COMPILE_OPTIONS(${PROJECT_NAME} PUBLIC "/bigobj")
ENDIF()
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
IF(BUILD_WITH_COMMIT_VERSION)
TAG_LIBRARY_VERSION(${PROJECT_NAME})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment