Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable -Wredundant-decls in CMake on Windows build #38402

Merged
merged 1 commit into from
Feb 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,13 @@ ELSE()
-Wold-style-cast \
-Woverloaded-virtual \
-Wpedantic \
-Wredundant-decls \
-Wsuggest-override \
-Wunused-macros \
-Wzero-as-null-pointer-constant \
-Wno-unknown-warning-option")
IF (NOT ${CMAKE_SYSTEM_NAME} MATCHES Windows)
SET(CATA_WARNINGS "${CATA_WARNINGS} -Wredundant-decls")
ENDIF()
# Compact the whitespace in the warning string
string(REGEX REPLACE "[\t ]+" " " CATA_WARNINGS "${CATA_WARNINGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CATA_WARNINGS}")
Expand Down
2 changes: 1 addition & 1 deletion src/posix_time.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "posix_time.h"

#if defined(_WIN32) && !defined(__CYGWIN__)
#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(WINPTHREAD_API)
#include <cerrno>

int
Expand Down
2 changes: 1 addition & 1 deletion src/posix_time.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <ctime> // IWYU pragma: keep

#if defined(_WIN32) && !defined(__CYGWIN__)
#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(WINPTHREAD_API)
/* Windows platforms. */

/* Windows lacks the nanosleep() function. The following code was stuffed
Expand Down