Skip to content

Commit

Permalink
Hide dependency warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
SupSuper committed Mar 9, 2019
1 parent 457bd63 commit be2ce45
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ endif()

# MSVC has default flags that CMake doesn't set
if (MSVC)
add_definitions(-DUNICODE -D_UNICODE -D_CRT_SECURE_NO_WARNINGS)
add_definitions(-DUNICODE -D_UNICODE)
if (MSVC_VERSION GREATER_EQUAL 1910)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /permissive-")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /permissive-")
Expand Down
11 changes: 11 additions & 0 deletions dependencies/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ if(NOT WIN32)
target_compile_definitions(OpenApoc_LibSmacker PUBLIC PTHREADS_AVAILABLE)
endif()

if (MSVC)
target_compile_definitions(OpenApoc_LibSmacker PRIVATE _CRT_SECURE_NO_WARNINGS)
endif()

set (MINIZ_SOURCE_FILES
miniz/miniz.c
miniz/miniz_zip.c
Expand Down Expand Up @@ -132,3 +136,10 @@ list(APPEND ALL_HEADER_FILES ${LUA_HEADER_FILES})
target_include_directories(OpenApoc_Lua PUBLIC ${CMAKE_SOURCE_DIR})
target_include_directories(OpenApoc_Lua PRIVATE
${CMAKE_SOURCE_DIR}/dependencies/lua)

# we don't care about the coding practices of external dependencies
target_compile_options(OpenApoc_LibSmacker PRIVATE "-w")
target_compile_options(OpenApoc_LibPugixml PRIVATE "-w")
target_compile_options(OpenApoc_LibLodepng PRIVATE "-w")
target_compile_options(OpenApoc_Miniz PRIVATE "-w")
target_compile_options(OpenApoc_Lua PRIVATE "-w")

0 comments on commit be2ce45

Please sign in to comment.