Move error flags to Ripes lib to supress warnings in external projects
MODIFY
CMakeLists.txt
CMakeLists.txt
@@ -29,7 +29,7 @@ endif()
if(MSVC)
add_definitions(/bigobj) # Allow big object
elseif(MINGW)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wa,-mbig-obj") # Allow big object
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mbig-obj") # Allow big object
endif()
######################################################################

MODIFY
src/CMakeLists.txt
src/CMakeLists.txt
@@ -42,6 +42,14 @@ function(create_ripes_lib NAME)
endif()
endfunction()
+# Error flags on everything but MSVC
+if(NOT MSVC)
+ set(CMAKE_CXX_FLAGS "-Wextra -Wall \
+ -Werror=switch -Werror=return-type \
+ -Werror=unreachable-code")
+elseif(MINGW)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wa")
+endif()
# Create the parent library. This will include everything in the current directory.
create_ripes_lib(${RIPES_LIB} FIXED_NAME EXCLUDE_SRC_INC)

Move error flags to Ripes lib to supress warnings in external projects