mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 00:06:44 -04:00
CMake: When building on MSVC, add /bigobj to compiler where necessary
This commit is contained in:
parent
855d217f35
commit
8588ddc3dc
@ -146,6 +146,11 @@ add_compile_options(
|
||||
"$<${cxx_exceptions_property}:${cxx_exceptions_on}>"
|
||||
"$<$<NOT:${cxx_exceptions_property}>:${cxx_exceptions_off}>")
|
||||
|
||||
if(MSVC)
|
||||
set(msvc_bigobj_property "$<BOOL:$<TARGET_PROPERTY:MSVC_BIGOBJ>>")
|
||||
add_compile_options("$<${msvc_bigobj_property}:/bigobj>")
|
||||
endif()
|
||||
|
||||
# We should use -fvisibility=hidden everywhere, as it makes sure we think
|
||||
# about what symbols really should be exposed externally. For more info, see:
|
||||
# https://gcc.gnu.org/wiki/Visibility
|
||||
|
@ -100,6 +100,11 @@ target_link_libraries(p3display p3cull p3device p3pgraphnodes
|
||||
PKG::X11)
|
||||
target_interrogate(p3display ALL EXTENSIONS ${P3DISPLAY_IGATEEXT})
|
||||
|
||||
if(HAVE_EIGEN)
|
||||
# Eigen puts this over the threshold where bigobj is needed on MSVC
|
||||
set_target_properties(p3display PROPERTIES MSVC_BIGOBJ ON)
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_METALIBS)
|
||||
install(TARGETS p3display
|
||||
EXPORT Core COMPONENT Core
|
||||
|
@ -50,6 +50,11 @@ if(HAVE_AUDIO)
|
||||
endif()
|
||||
target_interrogate(p3grutil ALL)
|
||||
|
||||
if(HAVE_EIGEN)
|
||||
# Eigen puts this over the threshold where bigobj is needed on MSVC
|
||||
set_target_properties(p3grutil PROPERTIES MSVC_BIGOBJ ON)
|
||||
endif()
|
||||
|
||||
if(NOT BUILD_METALIBS)
|
||||
install(TARGETS p3grutil
|
||||
EXPORT Core COMPONENT Core
|
||||
|
Loading…
x
Reference in New Issue
Block a user