浏览代码

BUG 11451 - pass CMAKE_EXTRA_GENERATOR down.

This patch fixes the behavior of external projects with respect to
generators using the CMAKE_EXTRA_GENERATOR variable.
Marcus D. Hanwell 15 年之前
父节点
当前提交
74e49aa441
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      Modules/ExternalProject.cmake

+ 6 - 1
Modules/ExternalProject.cmake

@@ -1228,7 +1228,12 @@ function(_ep_add_configure_command name)
     if(cmake_generator)
       list(APPEND cmd "-G${cmake_generator}" "${source_dir}")
     else()
-      list(APPEND cmd "-G${CMAKE_GENERATOR}" "${source_dir}")
+      if(CMAKE_EXTRA_GENERATOR)
+        list(APPEND cmd "-G${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}"
+          "${source_dir}")
+      else()
+        list(APPEND cmd "-G${CMAKE_GENERATOR}" "${source_dir}")
+      endif()
     endif()
   endif()