[hatari-devel] Compiling Hatari with Clang (from LLVM project) and the resulting signed comparison warnings

Thomas Huth huth at users.berlios.de
Mon May 23 07:54:25 CEST 2011


Am Sun, 22 May 2011 12:15:00 +0300
schrieb Eero Tamminen <eerot at users.berlios.de>:

> 
> (And a huge amount of unused variables & argument warnings from
> uae-cpu/cpuemu.c.)

We've got some CMake magic in src/uae-cpu/CMakeLists.txt to disable
these warnings when compiling with GCC:

# Generated cpuemu.c contains a lot of warnings we don't really care about...
if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-sign-compare -Wno-shadow")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-variable -Wno-unused-label")
endif(CMAKE_COMPILER_IS_GNUCC)

I guess this is not triggered for clang anymore? Is there an easy way
to detect clang with cmake? Then you could enhance this if-statement...

 Thomas



More information about the hatari-devel mailing list