При запуске cmake ошибка `Не найден CMAKE_ASM_COMPILER`

#c #dll #cmake

#c #dll #cmake

Вопрос:

Я пытаюсь создать OpenBLAS из здесь, следуя этим инструкциям. После запуска

 cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON
  

Генерируемая ошибка:

 -- The C compiler identification is unknown
-- The ASM compiler identification is unknown
-- Didn't find assembler
CMake Error at CMakeLists.txt:6 (project):
  The CMAKE_C_COMPILER:

    clang-cl

  is not a full path and was not found in the PATH.

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:6 (project):
  No CMAKE_ASM_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.


-- Warning: Did not find file Compiler/-ASM
-- Configuring incomplete, errors occurred!
See also "D:/OpenBLAS_0.3.10/xianyi-OpenBLAS-63b03ef/build/CMakeFiles/CMakeOutput.log".
See also "D:/OpenBLAS_0.3.10/xianyi-OpenBLAS-63b03ef/build/CMakeFiles/CMakeError.log".
  

После небольшого поиска в Google я нашел эту веб-страницу: Ассемблер

В нем не указано, как решить эту проблему. Как это решить?

Комментарии:

1. Первая ошибка , которую вы получили, примерно CMAKE_C_COMPILER , и вы должны сначала устранить эту ошибку, прежде чем устранять другие ошибки. Вы запускаете команду с шага 6, но на шаге 5 вам предлагается активировать среду MSVC. Вы выполнили этот шаг? Как точно вы активировали среду MSVC?