--- hatari/src/uae-cpu/CMakeLists.txt 2019/04/09 08:48:49 1.1 +++ hatari/src/uae-cpu/CMakeLists.txt 2019/04/09 08:59:35 1.1.1.4 @@ -1,5 +1,5 @@ -include_directories(. ../.. ../includes ${SDL_INCLUDE_DIR}) +include_directories(. ../.. ../includes ${SDL_INCLUDE_DIR}) # Unfortunately we've got to specify the rules for the generated files twice, # once for cross compiling (with calling the host cc directly) and once @@ -32,22 +32,22 @@ else() # Rules for normal build follow add_executable(build68k build68k.c) - get_target_property(BUILD68K_EXE build68k LOCATION) add_custom_command(OUTPUT cpudefs.c - COMMAND ${BUILD68K_EXE} < ${CMAKE_CURRENT_SOURCE_DIR}/table68k >cpudefs.c + COMMAND build68k < ${CMAKE_CURRENT_SOURCE_DIR}/table68k >cpudefs.c DEPENDS table68k build68k) add_executable(gencpu gencpu.c readcpu.c cpudefs.c) - get_target_property(GENCPU_EXE gencpu LOCATION) - add_custom_command(OUTPUT cpuemu.c cpustbl.c - COMMAND ${GENCPU_EXE} DEPENDS gencpu) + add_custom_command(OUTPUT cpuemu.c cpustbl.c COMMAND gencpu DEPENDS gencpu) endif(CMAKE_CROSSCOMPILING) # Generated cpuemu.c contains a lot of warnings we don't really care about... -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused -Wno-sign-compare -Wno-shadow") +if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") +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) add_library(UaeCpu cpudefs.c cpuemu.c cpustbl.c