Skip to content

Commit

Permalink
correct cmake script to support Open Watcom toolchain
Browse files Browse the repository at this point in the history
Open Watcom doesn't support -Wall it uses -wx instead
-wcd=202 suppress message about unreferenced functions
  • Loading branch information
jmalak committed Nov 14, 2024
1 parent c8f56f0 commit aafd3fc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit aafd3fc

Please sign in to comment.