diff options
| author | Jim B <d3x0r@users.noreply.github.com> | 2025-07-06 09:32:49 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-06 09:32:49 -0700 |
| commit | f4d8b53546fd0ed0999a9717160b18b488988192 (patch) | |
| tree | 189a52b0bc7a9117e58a292fac6083800fd7df4d | |
| parent | 0daa8adfe8f6fa2adb6bfe086bc8910c95ee3e9d (diff) | |
| download | portable-f4d8b53546fd0ed0999a9717160b18b488988192.tar.gz portable-f4d8b53546fd0ed0999a9717160b18b488988192.tar.bz2 portable-f4d8b53546fd0ed0999a9717160b18b488988192.zip | |
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++.
| -rw-r--r-- | CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
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=) | |||
| 143 | set(CMAKE_POSITION_INDEPENDENT_CODE true) | 143 | set(CMAKE_POSITION_INDEPENDENT_CODE true) |
| 144 | 144 | ||
| 145 | if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") | 145 | if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") |
| 146 | add_compile_options(-Wno-pointer-sign) | 146 | add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-Wno-pointer-sign> $<$<COMPILE_LANGUAGE:C>:-Wno-pointer-sign>) |
| 147 | endif() | 147 | endif() |
| 148 | 148 | ||
| 149 | if(WIN32) | 149 | if(WIN32) |
