浏览代码

enable parallel compilation of unity target for MSVC

master
Sascha Kratky 8 年前
父节点
当前提交
80fd4ee00f
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. +7
    -0
      CMake/cotire.cmake

+ 7
- 0
CMake/cotire.cmake 查看文件

@@ -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}")


正在加载...
取消
保存