From aafd3fcf9cb3b9a71161d91ad74db64064b87623 Mon Sep 17 00:00:00 2001 From: Jiri Malak Date: Fri, 8 Nov 2024 17:54:51 +0100 Subject: [PATCH] correct cmake script to support Open Watcom toolchain Open Watcom doesn't support -Wall it uses -wx instead -wcd=202 suppress message about unreferenced functions --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 72e6550b5c..2923f932d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -200,6 +200,8 @@ find_package(Threads) if(DEFINED WARNING_C_FLAGS) set(CMAKE_C_FLAGS "${WARNING_C_FLAGS} ${CMAKE_C_FLAGS}") +elseif(CMAKE_C_COMPILER_ID STREQUAL "OpenWatcom") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wx -wcd=202") elseif(WIN32) # Windows cl.exe does not support the -Wextra, -Wno-unused and -Werror flags. set(CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS}")