Skip to content

Commit 32599b2

Browse files
committed
Fix failure in CMake 4.1 when targeting Windows: assembler not found
1 parent 38b9c34 commit 32599b2

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

cmake/Modules/AXConfigDefine.cmake

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -273,14 +273,12 @@ else()
273273
endif()
274274

275275
# Try enable asm & nasm compiler support
276-
set(can_use_assembler TRUE)
277-
enable_language(ASM)
278-
enable_language(ASM_NASM OPTIONAL)
279-
280-
if(NOT EXISTS "${CMAKE_ASM_NASM_COMPILER}")
281-
set(CMAKE_ASM_NASM_COMPILER_LOADED FALSE CACHE BOOL "Does cmake asm nasm compiler loaded" FORCE)
282-
message(AUTHOR_WARNING "The nasm compiler doesn't present on your system PATH, please download from: https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/")
276+
if(MSVC)
277+
enable_language(ASM_MASM OPTIONAL)
278+
else()
279+
enable_language(ASM OPTIONAL)
283280
endif()
281+
enable_language(ASM_NASM OPTIONAL)
284282

285283
# we don't need cmake BUILD_TESTING feature
286284
set(BUILD_TESTING FALSE CACHE BOOL "" FORCE)

0 commit comments

Comments
 (0)