소스 검색

fix COPY_UNITY for LINK_ONLY libraries

master
Sascha Kratky 8 년 전
부모
커밋
46d04a4e3c
1개의 변경된 파일14개의 추가작업 그리고 3개의 파일을 삭제
  1. +14
    -3
      CMake/cotire.cmake

+ 14
- 3
CMake/cotire.cmake 파일 보기

@@ -3133,13 +3133,24 @@ endfunction(cotire_target)
function (cotire_map_libraries _strategy _mappedLibrariesVar)
set (_mappedLibraries "")
foreach (_library ${ARGN})
if (_library MATCHES "^\\$<LINK_ONLY:(.+)>$")
set (_libraryName "${CMAKE_MATCH_1}")
set (_linkOnly TRUE)
else()
set (_libraryName "${_library}")
set (_linkOnly FALSE)
endif()
if ("${_strategy}" MATCHES "COPY_UNITY")
cotire_is_target_supported(${_library} _isSupported)
cotire_is_target_supported(${_libraryName} _isSupported)
if (_isSupported)
# use target's corresponding unity target, if available
get_target_property(_libraryUnityTargetName ${_library} COTIRE_UNITY_TARGET_NAME)
get_target_property(_libraryUnityTargetName ${_libraryName} COTIRE_UNITY_TARGET_NAME)
if (TARGET "${_libraryUnityTargetName}")
list (APPEND _mappedLibraries "${_libraryUnityTargetName}")
if (_linkOnly)
list (APPEND _mappedLibraries "$<LINK_ONLY:${_libraryUnityTargetName}>")
else()
list (APPEND _mappedLibraries "${_libraryUnityTargetName}")
endif()
else()
list (APPEND _mappedLibraries "${_library}")
endif()


불러오는 중...
취소
저장