summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-09-30 12:46:27 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-09-30 12:46:27 (GMT)
commit34d035e70e3ef3f79212bd8c5b5d36250090d856 (patch)
treeb53d2983bb643e26cc2872e174c09292b6c5ca5c /Modules
parent026c4a5d1b3ac3297b7a205d779cfcff6f74a67a (diff)
parentdf84281d68a715658ce0068c0869dd80831cd4a7 (diff)
downloadCMake-34d035e70e3ef3f79212bd8c5b5d36250090d856.zip
CMake-34d035e70e3ef3f79212bd8c5b5d36250090d856.tar.gz
CMake-34d035e70e3ef3f79212bd8c5b5d36250090d856.tar.bz2
Merge topic 'vs-nsight-tegra-generator'
df84281d Help: Add notes for topic 'vs-nsight-tegra-generator' 69e198dc VS: Generate Nsight Tegra project revision number 5365c9ac VS: Map Nsight Tegra file types in .vcxproj files 178f56a5 VS: Fix Tegra-Android platform linking of libraries by name 7115702f Tests: Add test for VS Nsight Tegra generator support a6289499 VS: Generate ANDROID_GUI executables as app packages c12e4699 Add 'ANDROID_API' target property to set Android Target API 9a4df52a Add 'ANDROID_GUI' target property to mark Android applications 16569abf cmTarget: Track internally whether platform is Android ef0fd4f0 VS: Teach vcxproj generation about the Tegra-Android platform d09b60f5 VS: Detect compiler id of Nsight Tegra-Android toolchains 2f071466 VS: Teach VS >= 10 to recognize CMAKE_SYSTEM_NAME 'Android'
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake22
-rw-r--r--Modules/CMakeFindBinUtils.cmake3
-rw-r--r--Modules/CompilerId/VS-NsightTegra.vcxproj.in56
-rw-r--r--Modules/Platform/Android.cmake6
4 files changed, 82 insertions, 5 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 "")
diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake
index dda28bd..e0ba131 100644
--- a/Modules/CMakeFindBinUtils.cmake
+++ b/Modules/CMakeFindBinUtils.cmake
@@ -35,7 +35,8 @@ if("${CMAKE_C_SIMULATE_ID}" STREQUAL "MSVC"
OR "${CMAKE_Fortran_SIMULATE_ID}" STREQUAL "MSVC"
OR "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC"
OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC"
- OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
+ OR ("${CMAKE_GENERATOR}" MATCHES "Visual Studio"
+ AND NOT CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android"))
find_program(CMAKE_LINKER NAMES link HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
diff --git a/Modules/CompilerId/VS-NsightTegra.vcxproj.in b/Modules/CompilerId/VS-NsightTegra.vcxproj.in
new file mode 100644
index 0000000..b7389eb
--- /dev/null
+++ b/Modules/CompilerId/VS-NsightTegra.vcxproj.in
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup Label="NsightTegraProject">
+ <NsightTegraProjectRevisionNumber>6</NsightTegraProjectRevisionNumber>
+ </PropertyGroup>
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|@id_platform@">
+ <Configuration>Debug</Configuration>
+ <Platform>@id_platform@</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{CAE07175-D007-4FC3-BFE8-47B392814159}</ProjectGuid>
+ <RootNamespace>CompilerId@id_lang@</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@id_platform@'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ @id_toolset@
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|@id_platform@'">.\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|@id_platform@'">$(Configuration)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|@id_platform@'">false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@id_platform@'">
+ <ClCompile>
+ <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ </Link>
+ <PostBuildEvent>
+ <Command>
+if "$(ToolchainName)"=="gcc" (
+ for %%i in ($(ToolchainPrebuiltRoot)\bin\*@id_gcc@.exe) do (
+ @echo CMAKE_@id_lang@_COMPILER=%%i
+ goto :done
+ )
+)
+if "$(ToolchainName)"=="clang" (
+ for %%i in ($(ToolchainPrebuiltRoot)\bin\*@id_clang@.exe) do (
+ @echo CMAKE_@id_lang@_COMPILER=%%i
+ goto :done
+ )
+)
+:done
+</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="@id_src@" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+</Project>
diff --git a/Modules/Platform/Android.cmake b/Modules/Platform/Android.cmake
index e6d4fcf..1bdad04 100644
--- a/Modules/Platform/Android.cmake
+++ b/Modules/Platform/Android.cmake
@@ -7,3 +7,9 @@ set(CMAKE_PLATFORM_NO_VERSIONED_SONAME 1)
# Android reportedly ignores RPATH, and we cannot predict the install
# location anyway.
set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "")
+
+# Nsight Tegra Visual Studio Edition takes care of
+# prefixing library names with '-l'.
+if(CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android")
+ set(CMAKE_LINK_LIBRARY_FLAG "")
+endif()