Skip to content

Commit acc37a4

Browse files
authored
cmake: fix CMP0194 warning on Windows with MSVC (ggml-org#21630)
* cmake: fix CMP0194 warning on Windows with MSVC Set CMP0194 policy to NEW before project() call in ggml/CMakeLists.txt to suppress the "MSVC is not an assembler for language ASM" warning introduced in CMake 4.1. The ggml project enables ASM globally for Metal (macOS) and KleidiAI (ARM) backends. On Windows/MSVC, no assembler sources are used, but CMake 4.1+ warns because cl.exe is not a valid ASM compiler. This follows the same pattern used in ggml-vulkan (CMP0114, CMP0147). Closes ggml-org#20311 * cmake: apply cisc's formatting suggestion --------- Co-authored-by: texasich <texasich@users.noreply.github.com>
1 parent 5a23695 commit acc37a4

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

ggml/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
cmake_minimum_required(VERSION 3.14...3.28) # for add_link_options and implicit target directories.
2+
3+
# ref: https://cmake.org/cmake/help/latest/policy/CMP0194.html
4+
# MSVC is not a valid assembler for the ASM language.
5+
# Set to NEW to avoid a warning on CMake 4.1+ with MSVC.
6+
if (POLICY CMP0194)
7+
cmake_policy(SET CMP0194 NEW)
8+
endif()
29
project("ggml" C CXX ASM)
310

411
### GGML Version

0 commit comments

Comments
 (0)