Environment variable used by CMake to detect Visual C++ compiler tools for Ninja

后端 未结 2 1881
感情败类
感情败类 2020-11-27 23:15

I have Mingw64 GCC 6.3.0 (always in PATH) and Visual C++ compiler tools from Visual Studio 2017 RTM (not in PATH).

If I run cmake . -

2条回答
  •  暖寄归人
    2020-11-27 23:47

    use a toolchain file

    set(CMAKE_C_COMPILER cl.exe)
    set(CMAKE_CXX_COMPILER cl.exe)
    

    then build your cmake project with with -DCMAKE_TOOLCHAIN_FILE=toolchainfile

提交回复
热议问题