Unable to install toolbox for new v140_clang_3_7 in Visual Studio 2015 Update 1 CMake

So, I just downloaded the new Visual Studio Update 1 and am trying to get CMake to create the right set of platform tools.

New in Update 1 A new toolbox has appeared: Clang 3.7 with Microsoft CodeGen enter image description here

Pretty interesting, yes!

Anyway, I'm trying to get CMake to generate the correct toolbox here.

Assumption 1: . The name of the toolbox that CMake will accept will be v140_clang_3_7. I guess this is because this is what is in brackets, and this is what is used in other toolboxes like v120etc.

So, I am setting up a simple test case:

C:\Users\russe\Documents\TestCMAKECLANG>ls
CMakeLists.txt  main.cpp

C:\Users\russe\Documents\TestCMAKECLANG>cat CMakeLists.txt
cmake_minimum_required(VERSION 3.0)


add_executable(TestEXE main.cpp)
C:\Users\russe\Documents\TestCMAKECLANG>cat main.cpp


// use some fancy c++14 feature that VS doesn't have

template<typename T>
constexpr T doThing{};

int main(){}
C:\Users\russe\Documents\TestCMAKECLANG>

CMake :

2:

C:\Users\russe\Documents\TestCMAKECLANG>cmake -G "Visual Studio 14 2015" -T "v140_clang_3_7"
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error in :
  No CMAKE_C_COMPILER could be found.



CMake Error in :
  No CMAKE_CXX_COMPILER could be found.



-- Configuring incomplete, errors occurred!
See also "C:/Users/russe/Documents/TestCMAKECLANG/CMakeFiles/CMakeOutput.log".
See also "C:/Users/russe/Documents/TestCMAKECLANG/CMakeFiles/CMakeError.log".

C:\Users\russe\Documents\TestCMAKECLANG>

! CMAKE_C_COMPILER CMAKE_CXX_COMPILER .

. , , -T . v120

C:\Users\russe\Documents\TestCMAKECLANG>cmake -G "Visual Studio 14 2015" -T "v120"
-- The C compiler identification is MSVC 18.0.31010.0
-- The CXX compiler identification is MSVC 18.0.31010.0
-- Check for working C compiler using: Visual Studio 14 2015
-- Check for working C compiler using: Visual Studio 14 2015 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 14 2015
-- Check for working CXX compiler using: Visual Studio 14 2015 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/russe/Documents/TestCMAKECLANG

C:\Users\russe\Documents\TestCMAKECLANG>

enter image description here

. .

, , ?

+4
1

, . .

, , , .

Clang.

-

cmake -G "Visual Studio 14 2015" -T v140_clang_3_7 ... 

, , Clang

set_property(TARGET ${project} PROPERTY VS_PLATFORM_TOOLSET_OVERRIDE "v140_clang_3_7") 
-1

Source: https://habr.com/ru/post/1618062/


All Articles