From f1b1b84b224695a599b87aa24db651c0fa583f9c Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 15 Apr 2025 11:50:35 -0400 Subject: [PATCH] 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 --- Modules/CMakeDetermineASM_NASMCompiler.cmake | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Modules/CMakeDetermineASM_NASMCompiler.cmake b/Modules/CMakeDetermineASM_NASMCompiler.cmake index f110efdad3..82d7430b3e 100644 --- a/Modules/CMakeDetermineASM_NASMCompiler.cmake +++ b/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)