From 06c396126fb7734326075b56c859330a31ba5707 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 18 Oct 2016 13:03:34 -0400 Subject: [PATCH 1/3] VS: Fix NVIDIA Nsight Tegra Visual Studio Edition support The guard added by commit v3.7.0-rc1~229^2~17 (Android: Suppress new functionality with Nsight Tegra in VS IDE builds, 2016-06-02) to `Modules/Platform/Android-Determine.cmake` does not work in that location because `CMAKE_VS_PLATFORM_NAME` is not set until after the module is loaded. Change this particular guard to test for the Visual Studio generator instead. If in the future we add support for using Visual Studio for Android without Nsight Tegra then something more will be needed, but this is good enough for now. Closes: #16371 --- Modules/Platform/Android-Determine.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/Platform/Android-Determine.cmake b/Modules/Platform/Android-Determine.cmake index fd7c3bc46..6d370ab27 100644 --- a/Modules/Platform/Android-Determine.cmake +++ b/Modules/Platform/Android-Determine.cmake @@ -8,7 +8,7 @@ # Support for NVIDIA Nsight Tegra Visual Studio Edition was previously # implemented in the CMake VS IDE generators. Avoid interfering with # that functionality for now. Later we may try to integrate this. -if(CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android") +if(CMAKE_GENERATOR MATCHES "Visual Studio") return() endif() From 6739d24030b7cb593be5557349ee6678b58bcc5a Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 18 Oct 2016 13:25:35 -0400 Subject: [PATCH 2/3] Tests: Fix VSNsightTegra test on Android NDK r12b Test with architecture `armv7-a` instead of `armv7-a-hard` because the latter is supporte supported only with NDK revisions r9c to r11c. --- Tests/VSNsightTegra/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/VSNsightTegra/CMakeLists.txt b/Tests/VSNsightTegra/CMakeLists.txt index 61a04fdd3..6d74f2f85 100644 --- a/Tests/VSNsightTegra/CMakeLists.txt +++ b/Tests/VSNsightTegra/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.3) project(VSNsightTegra C CXX) -set(CMAKE_ANDROID_ARCH armv7-a-hard) +set(CMAKE_ANDROID_ARCH armv7-a) set(CMAKE_ANDROID_STL_TYPE stlport_shared) set(CMAKE_ANDROID_API_MIN 9) set(CMAKE_ANDROID_API 15) From 9af881d810d464a357c8bac5eb4423aa970fffb6 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 18 Oct 2016 13:31:16 -0400 Subject: [PATCH 3/3] Tests: Add VSNsightTegra test for VS 2015 --- Tests/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 31ed2eb21..7df9403e2 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -2166,6 +2166,9 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release if(vs12) add_test_VSNsightTegra(vs12 "Visual Studio 12 2013") endif() + if(vs14) + add_test_VSNsightTegra(vs14 "Visual Studio 14 2015") + endif() endif() if (APPLE)