From e371a454008c4969492671b12d280f3c94e31fae Mon Sep 17 00:00:00 2001 From: emankov Date: Fri, 4 Jan 2019 18:52:28 +0300 Subject: [PATCH] [HIPIFY][cmake][win] check for Visual Studio version hipify-clang could be built by Visual Studio 14 2015 or higher. [Reason] hipify-clang contains c++14 features which are not supported even by the latest VS 2013 and the Platform Toolset "Visual C++ Compiler Nov 2013 CTP". [ROCm/hip commit: cd15a856638d0a2dcc1c5c999d3baca37cdcafba] --- projects/hip/hipify-clang/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/hip/hipify-clang/CMakeLists.txt b/projects/hip/hipify-clang/CMakeLists.txt index 56de7c7904..09f6cb8a38 100644 --- a/projects/hip/hipify-clang/CMakeLists.txt +++ b/projects/hip/hipify-clang/CMakeLists.txt @@ -1,6 +1,11 @@ cmake_minimum_required(VERSION 2.8.12) project(hipify-clang) +if (MSVC AND MSVC_VERSION VERSION_LESS "1900") + message(SEND_ERROR "hipify-clang could be built by Visual Studio 14 2015 or higher.") + return() +endif() + find_package(LLVM REQUIRED) message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}:") message(STATUS " - CMake module path: ${LLVM_CMAKE_DIR}")