summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCompilerId.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-06-10 15:30:28 (GMT)
committerBrad King <brad.king@kitware.com>2014-09-29 20:05:53 (GMT)
commitd09b60f563902bd2197d88a3e83b119c09e62428 (patch)
tree2465a779918985085c451bd06d43422a2b992f87 /Modules/CMakeDetermineCompilerId.cmake
parent2f071466ebd4e3a416a523ac5f17c84543ff8b3c (diff)
downloadCMake-d09b60f563902bd2197d88a3e83b119c09e62428.zip
CMake-d09b60f563902bd2197d88a3e83b119c09e62428.tar.gz
CMake-d09b60f563902bd2197d88a3e83b119c09e62428.tar.bz2
VS: Detect compiler id of Nsight Tegra-Android toolchains
Teach CMakeDetermineCompilerId to recognize the Tegra-Android platform and generate a test project for Nsight Tegra tools. Locate the full path to CMAKE_<LANG>_COMPILER by computing it within the test project build environment. Also teach CMakeFindBinUtils that this variant of the Visual Studio generator uses UNIX-like instead of MS-like archiving and linking tools.
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake22
1 files changed, 18 insertions, 4 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index e00f22a..a7b5760 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -142,7 +142,17 @@ Id flags: ${testflags}
set(id_platform ${CMAKE_VS_PLATFORM_NAME})
set(id_lang "${lang}")
set(id_cl cl.exe)
- if(lang STREQUAL Fortran)
+ if(CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android")
+ set(v NsightTegra)
+ set(ext vcxproj)
+ if(lang STREQUAL CXX)
+ set(id_gcc g++)
+ set(id_clang clang++)
+ else()
+ set(id_gcc gcc)
+ set(id_clang clang)
+ endif()
+ elseif(lang STREQUAL Fortran)
set(v Intel)
set(ext vfproj)
set(id_cl ifort.exe)
@@ -161,9 +171,13 @@ Id flags: ${testflags}
set(id_platform ia64)
endif()
if(CMAKE_VS_PLATFORM_TOOLSET)
- set(id_toolset "<PlatformToolset>${CMAKE_VS_PLATFORM_TOOLSET}</PlatformToolset>")
- if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "Intel")
- set(id_cl icl.exe)
+ if(CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android")
+ set(id_toolset "<NdkToolchainVersion>${CMAKE_VS_PLATFORM_TOOLSET}</NdkToolchainVersion>")
+ else()
+ set(id_toolset "<PlatformToolset>${CMAKE_VS_PLATFORM_TOOLSET}</PlatformToolset>")
+ if(CMAKE_VS_PLATFORM_TOOLSET MATCHES "Intel")
+ set(id_cl icl.exe)
+ endif()
endif()
else()
set(id_toolset "")