From f4d8b53546fd0ed0999a9717160b18b488988192 Mon Sep 17 00:00:00 2001 From: Jim B Date: Sun, 6 Jul 2025 09:32:49 -0700 Subject: Limit usage of warning flags to C and C++ `add_compile_options()` adds options to all compilers CMake can invoke, including ASM. The format of this warning flag causes MASM to fail if the option is specified. This limits specifying the warning suppression to just C and C++. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 182cf96..4d46cda 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -143,7 +143,7 @@ add_definitions(-D__END_HIDDEN_DECLS=) set(CMAKE_POSITION_INDEPENDENT_CODE true) if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") - add_compile_options(-Wno-pointer-sign) + add_compile_options($<$:-Wno-pointer-sign> $<$:-Wno-pointer-sign>) endif() if(WIN32) -- cgit v1.2.3-55-g6feb From 5c205f4be3eed1aa477c208392956a8935d49f2d Mon Sep 17 00:00:00 2001 From: Jim B Date: Sun, 6 Jul 2025 15:48:55 -0700 Subject: Remove applying flag to C++ code --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d46cda..3a035bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -143,7 +143,7 @@ add_definitions(-D__END_HIDDEN_DECLS=) set(CMAKE_POSITION_INDEPENDENT_CODE true) if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") - add_compile_options($<$:-Wno-pointer-sign> $<$:-Wno-pointer-sign>) + add_compile_options($<$:-Wno-pointer-sign>) endif() if(WIN32) -- cgit v1.2.3-55-g6feb