Skip to content

Commit 20ddaa5

Browse files
committed
Fix build for Linux GCC.
1 parent 455c479 commit 20ddaa5

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

SerialPrograms/CMakeLists.txt

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2299,10 +2299,15 @@ else()
22992299
target_link_libraries(SerialPrograms PRIVATE libdpp)
23002300
endif()
23012301

2302-
# Add -Wno-c11-extensions to avoid clang gives
2303-
# /usr/local/Cellar/opencv/4.5.5_3/include/opencv4/opencv2/core/mat.inl.hpp:2116:9: error: '_Atomic' is a C11 extension
2304-
# when compiling OpenCV
2305-
target_compile_options(SerialPrograms PRIVATE -Wall -Wextra -Wpedantic -Werror -Wno-c11-extensions)
2302+
if (APPLE)
2303+
# Add -Wno-c11-extensions to avoid clang gives
2304+
# /usr/local/Cellar/opencv/4.5.5_3/include/opencv4/opencv2/core/mat.inl.hpp:2116:9: error: '_Atomic' is a C11 extension
2305+
# when compiling OpenCV
2306+
target_compile_options(SerialPrograms PRIVATE -Wall -Wextra -Wpedantic -Werror -Wno-c11-extensions)
2307+
else()
2308+
# Assume GCC
2309+
target_compile_options(SerialPrograms PRIVATE -Wall -Wextra -Wpedantic -Werror -fno-strict-aliasing)
2310+
endif()
23062311

23072312
# Set OS-specific flags
23082313
if (WIN32)

SerialPrograms/Source/PokemonSV/Programs/FastCodeEntry/PokemonSV_CodeEntry.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ FastCodeEntryKeyboardLayout::FastCodeEntryKeyboardLayout()
3939
PA_ADD_OPTION(CONSOLE[2]);
4040
PA_ADD_OPTION(CONSOLE[3]);
4141
}
42+
FastCodeEntryKeyboardLayout::~FastCodeEntryKeyboardLayout() = default;
4243

4344

4445
FastCodeEntrySettingsOption::FastCodeEntrySettingsOption()

SerialPrograms/Source/PokemonSV/Programs/FastCodeEntry/PokemonSV_CodeEntry.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ namespace PokemonSV{
2222
class FastCodeEntryKeyboardLayout : public GroupOption{
2323
public:
2424
FastCodeEntryKeyboardLayout();
25+
~FastCodeEntryKeyboardLayout();
2526

2627
public:
2728
FixedLimitVector<KeyboardLayoutOption> CONSOLE;

0 commit comments

Comments
 (0)