Преглед изворни кода

ASM_NASM: Honor ASM_NASM env var over standard NASM installation on Windows

Drop the custom `find_program` call in favor of the common
infrastructure.

Fixes: #26873
Brad King пре 6 месеци
родитељ
комит
f1b1b84b22
1 измењених фајлова са 2 додато и 8 уклоњено
  1. 2 8
      Modules/CMakeDetermineASM_NASMCompiler.cmake

+ 2 - 8
Modules/CMakeDetermineASM_NASMCompiler.cmake

@@ -11,20 +11,14 @@ if(NOT CMAKE_ASM_NASM_COMPILER)
   set(_CMAKE_ASM_NASM_COMPILER_PATHS
     "[HKEY_CURRENT_USER\\SOFTWARE\\nasm]"
     "$ENV{ProgramFiles}/NASM"
-    "$ENV{${ENV_VARX86}}/NASM"
+    "$ENV{${_CMAKE_ENV_VARX86}}/NASM"
     "$ENV{LOCALAPPDATA}/NASM"
-    )
-  find_program(CMAKE_ASM_NASM_COMPILER
-    NAMES ${CMAKE_ASM_NASM_COMPILER_LIST}
-    PATHS ${_CMAKE_ASM_NASM_COMPILER_PATHS}
-    NO_DEFAULT_PATH
-    DOC "NASM compiler"
   )
   unset(_CMAKE_ENV_VARX86)
-  unset(_CMAKE_ASM_NASM_COMPILER_PATHS)
 endif()
 
 # Load the generic DetermineASM compiler file with the DIALECT set properly:
 set(ASM_DIALECT "_NASM")
 include(CMakeDetermineASMCompiler)
 set(ASM_DIALECT)
+unset(_CMAKE_ASM_NASM_COMPILER_PATHS)