Skip to content

Commit

Permalink
Fixing CMake build issues on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkwhoffmann committed Apr 22, 2022
1 parent 44be778 commit e8f4f0e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 28 deletions.
6 changes: 1 addition & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,10 @@ target_link_libraries(testRunner musashi)

# Add compile options
target_compile_options(testRunner PUBLIC -Wno-unused-parameter)
target_compile_options(testRunner PUBLIC -Wno-unused-variable)
target_compile_options(testRunner PUBLIC -Wno-gnu-anonymous-struct)
target_compile_options(testRunner PUBLIC -Wno-nested-anon-types)

if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(testRunner PUBLIC -fconcepts)
else()
endif()

# Add include paths
target_include_directories(testRunner PUBLIC

Expand Down
4 changes: 4 additions & 0 deletions Moira/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ MoiraDebugger.cpp
)

target_compile_options(moira PUBLIC -Wno-unused-parameter)

if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(moira PUBLIC -fconcepts)
endif()
2 changes: 1 addition & 1 deletion Moira/MoiraDebugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ Debugger::vectorName(u8 vectorNr)
if (vectorNr >= 32 && vectorNr <= 47) {
return "Trap #" + std::to_string(vectorNr - 32);
}
if (vectorNr >= 64 && vectorNr <= 255) {
if (vectorNr >= 64) {
return "User interrupt vector";
}
switch (vectorNr) {
Expand Down
3 changes: 2 additions & 1 deletion Moira/MoiraExec_cpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1372,6 +1372,7 @@ Moira::execMovepDxEa(u16 opcode)
{
writeM <M,Byte> (ea, (dx >> 24) & 0xFF); ea += 2;
writeM <M,Byte> (ea, (dx >> 16) & 0xFF); ea += 2;
[[fallthrough]];
}
case Word:
{
Expand Down Expand Up @@ -1399,7 +1400,7 @@ Moira::execMovepEaDx(u16 opcode)
{
dx |= readMS <MEM_DATA, Byte> (ea) << 24; ea += 2;
dx |= readMS <MEM_DATA, Byte> (ea) << 16; ea += 2;
// fallthrough
[[fallthrough]];
}
case Word:
{
Expand Down
26 changes: 5 additions & 21 deletions Musashi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,10 @@ m68kdasm.c
m68kops.c
)

target_compile_options(musashi PUBLIC -pedantic)
target_compile_options(musashi PUBLIC -Wno-strict-aliasing)
target_compile_options(musashi PUBLIC -Wno-string-concatenation)

#add_compile_options(musashi -Wall -Wextra -Werror -pedantic)
#add_compile_options(musashi -Wno-strict-aliasing)
#add_compile_options(musashi -Wno-string-concatenation)

#OBJECTS = m68kfpu.o m68kcpu.o m68kdasm.o m68kops.o
#CC = gcc
#WARNINGS = -Wall -Wextra -pedantic -Wno-strict-aliasing -Wno-string-concatenation
#OPTIMIZE = -flto -O3
#CFLAGS = $(WARNINGS) $(OPTIMIZE)
#
#.PHONY: all clean
#
#all: $(OBJECTS)
#
#clean:
# rm -f *.o
#
#$(OBJECTS): %.o: %.c *.h
# $(CC) -c $(CFLAGS) $<
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(musashi PUBLIC -Wno-format-overflow)
else()
target_compile_options(musashi PUBLIC -Wno-string-concatenation)
endif()

0 comments on commit e8f4f0e

Please sign in to comment.