Skip to content

Commit

Permalink
Fix GCC warnings in stonesense.
Browse files Browse the repository at this point in the history
  • Loading branch information
BenLubar committed Apr 6, 2018
1 parent 0430344 commit 9724981
Show file tree
Hide file tree
Showing 23 changed files with 314 additions and 316 deletions.
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,16 @@ SET(PROJECT_SRCS

#proto files to include.
SET(PROJECT_PROTO
../../proto/RemoteFortressReader
../../proto/ItemdefInstrument
${CMAKE_CURRENT_SOURCE_DIR}/../proto/RemoteFortressReader.pb.cc
${CMAKE_CURRENT_SOURCE_DIR}/../proto/ItemdefInstrument.pb.cc
)

SET_SOURCE_FILES_PROPERTIES( ${PROJECT_HDRS} PROPERTIES HEADER_FILE_ONLY TRUE)
SET_SOURCE_FILES_PROPERTIES( ${PROJECT_PROTO} PROPERTIES GENERATED TRUE)

# mash them together (headers are marked as headers and nothing will try to compile them)
LIST(APPEND PROJECT_SRCS ${PROJECT_HDRS};${PROJECT_PROTO})

IF(UNIX)
IF(APPLE)
# Mac OS X
Expand Down Expand Up @@ -224,7 +230,7 @@ ELSE(UNIX)
)
ENDIF(UNIX)

DFHACK_PLUGIN(stonesense ${PROJECT_SRCS} LINK_LIBRARIES ${DFHACK_TINYXML} ${PROJECT_LIBS} PROTOBUFS ${PROJECT_PROTO})
DFHACK_PLUGIN(stonesense ${PROJECT_SRCS} LINK_LIBRARIES ${DFHACK_TINYXML} ${PROJECT_LIBS} COMPILE_FLAGS_MSVC "/FI\"Export.h\" /wd4312 /wd4996 /wd4251" COMPILE_FLAGS_GCC "-include Export.h -Wno-misleading-indentation")

# Make sure the source is generated before the executable builds.
ADD_DEPENDENCIES(stonesense generate_proto)
Expand Down
Loading

0 comments on commit 9724981

Please sign in to comment.