summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-09-10 15:23:22 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-09-10 15:23:22 (GMT)
commit0a92b23c52675bf8fe93cb9959266a49ab509ac1 (patch)
tree0f7a40cbf62c8fbbb6b19843a118faa942ce9a51 /Modules
parent2bfe48d6af963472fbd4073f729669306eccac69 (diff)
parent09c8ad99433df06ed36791bfaef97996cd2de04e (diff)
downloadCMake-0a92b23c52675bf8fe93cb9959266a49ab509ac1.zip
CMake-0a92b23c52675bf8fe93cb9959266a49ab509ac1.tar.gz
CMake-0a92b23c52675bf8fe93cb9959266a49ab509ac1.tar.bz2
Merge topic 'vs-generator-platform'
09c8ad99 enable_language: Initialize system-specific generator info only once 09ab207c Tests: Add generator platform support 6944997b ExternalProject: Propagate the generator platform 8d332091 CTest: Add options to set generator platform b97736a2 VS: Implement CMAKE_GENERATOR_PLATFORM for VS >= 8 0f1f1271 CMake: Add CMAKE_GENERATOR_PLATFORM option 4f7d0c42 Help: Document CMAKE_VS_PLATFORM_NAME variable 68d4280a VS: Refactor internal default platform name selection ad2a4776 cmGlobalVisualStudio10Generator: Re-order some methods 03b7b6cd cmGlobalGenerator: Call SetGeneratorToolset even for empty toolset
Diffstat (limited to 'Modules')
-rw-r--r--Modules/ExternalProject.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index b5d36ce..27026f3 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -49,6 +49,7 @@
# [CONFIGURE_COMMAND cmd...] # Build tree configuration command
# [CMAKE_COMMAND /.../cmake] # Specify alternative cmake executable
# [CMAKE_GENERATOR gen] # Specify generator for native build
+# [CMAKE_GENERATOR_PLATFORM p] # Generator-specific platform name
# [CMAKE_GENERATOR_TOOLSET t] # Generator-specific toolset name
# [CMAKE_ARGS args...] # Arguments to CMake command line
# [CMAKE_CACHE_ARGS args...] # Initial cache arguments, of the form -Dvar:string=on
@@ -1758,9 +1759,13 @@ function(_ep_add_configure_command name)
endif()
get_target_property(cmake_generator ${name} _EP_CMAKE_GENERATOR)
+ get_target_property(cmake_generator_platform ${name} _EP_CMAKE_GENERATOR_PLATFORM)
get_target_property(cmake_generator_toolset ${name} _EP_CMAKE_GENERATOR_TOOLSET)
if(cmake_generator)
list(APPEND cmd "-G${cmake_generator}")
+ if(cmake_generator_platform)
+ list(APPEND cmd "-DCMAKE_GENERATOR_PLATFORM=${cmake_generator_platform}")
+ endif()
if(cmake_generator_toolset)
list(APPEND cmd "-T${cmake_generator_toolset}")
endif()
@@ -1770,6 +1775,12 @@ function(_ep_add_configure_command name)
else()
list(APPEND cmd "-G${CMAKE_GENERATOR}")
endif()
+ if(cmake_generator_platform)
+ message(FATAL_ERROR "Option CMAKE_GENERATOR_PLATFORM not allowed without CMAKE_GENERATOR.")
+ endif()
+ if(CMAKE_GENERATOR_PLATFORM)
+ list(APPEND cmd "-DCMAKE_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}")
+ endif()
if(cmake_generator_toolset)
message(FATAL_ERROR "Option CMAKE_GENERATOR_TOOLSET not allowed without CMAKE_GENERATOR.")
endif()