Ver código fonte

enable parallel compilation of unity target for MSVC

master
Sascha Kratky 8 anos atrás
pai
commit
80fd4ee00f
1 arquivos alterados com 7 adições e 0 exclusões
  1. +7
    -0
      CMake/cotire.cmake

+ 7
- 0
CMake/cotire.cmake Ver arquivo

@@ -3309,6 +3309,13 @@ function (cotire_setup_unity_build_target _languages _configurations _target)
set_property(TARGET ${_unityTargetName} PROPERTY ENABLE_EXPORTS TRUE)
endif()
endif()
# enable parallel compilation for MSVC
if (MSVC AND "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
list (LENGTH _unityTargetSources _numberOfUnityTargetSources)
if (_numberOfUnityTargetSources GREATER 1)
set_property(TARGET ${_unityTargetName} APPEND PROPERTY COMPILE_OPTIONS "/MP")
endif()
endif()
cotire_init_target(${_unityTargetName})
cotire_add_to_unity_all_target(${_unityTargetName})
set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_TARGET_NAME "${_unityTargetName}")


Carregando…
Cancelar
Salvar