mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-14 00:52:04 +00:00
fixes compiler warnings (#9619)
* compiler warnings: adds SYSTEM to [target_]include_directories to skip warnings originating from dependencies * compiler warnings: uninitialized/unused variables, missing parenthesis, pragma * compiler warnings: redundant template type, missing curly braces, pass 0 instead of NULL as int argument * compiler warnings: removes fclose(fp) where fp==nullptr since fclose() has attribute __nonnull((1)) * compiler warnings: uninitialized variables, missing parentheses, missing curly braces * compiler warnings: ? as lower precedence than << * compiler warnings: unused variable * compiler warnings: unused result * compiler warnings: undefined/unused variable * compiler warnings: uninitialized variable
This commit is contained in:
committed by
GitHub
parent
9569841091
commit
3ecca6116d
@@ -264,7 +264,7 @@ if(WIN32)
|
||||
if(WIN10SDK_INCLUDE_PATH)
|
||||
message("Building with Win10 Netfabb STL fixing service support")
|
||||
add_definitions(-DHAS_WIN10SDK)
|
||||
include_directories("${WIN10SDK_INCLUDE_PATH}")
|
||||
include_directories(SYSTEM "${WIN10SDK_INCLUDE_PATH}")
|
||||
else()
|
||||
message("Building without Win10 Netfabb STL fixing service support")
|
||||
endif()
|
||||
@@ -292,7 +292,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
find_package(DBus REQUIRED)
|
||||
include_directories(${DBUS_INCLUDE_DIRS})
|
||||
include_directories(SYSTEM ${DBUS_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUXX)
|
||||
@@ -401,11 +401,11 @@ message(STATUS "LIBDIR: ${LIBDIR}")
|
||||
message(STATUS "LIBDIR_BIN: ${LIBDIR_BIN}")
|
||||
|
||||
# For the bundled boost libraries (boost::nowide)
|
||||
include_directories(${LIBDIR})
|
||||
include_directories(SYSTEM ${LIBDIR})
|
||||
# For generated header files
|
||||
include_directories(${LIBDIR_BIN}/platform)
|
||||
include_directories(SYSTEM ${LIBDIR_BIN}/platform)
|
||||
# For ligigl
|
||||
include_directories(${LIBDIR}/libigl)
|
||||
include_directories(SYSTEM ${LIBDIR}/libigl)
|
||||
|
||||
if(WIN32)
|
||||
add_definitions(-D_USE_MATH_DEFINES -D_WIN32 -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS)
|
||||
@@ -501,7 +501,7 @@ function(slic3r_remap_configs targets from_Cfg to_Cfg)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
target_include_directories(boost_headeronly INTERFACE ${Boost_INCLUDE_DIRS})
|
||||
target_include_directories(boost_headeronly SYSTEM INTERFACE ${Boost_INCLUDE_DIRS})
|
||||
target_link_libraries(boost_libs INTERFACE boost_headeronly ${Boost_LIBRARIES})
|
||||
|
||||
# Find and configure intel-tbb
|
||||
@@ -511,7 +511,7 @@ endif()
|
||||
set(TBB_DEBUG 1)
|
||||
set(CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO RelWithDebInfo Release "")
|
||||
find_package(TBB REQUIRED)
|
||||
# include_directories(${TBB_INCLUDE_DIRS})
|
||||
# include_directories(SYSTEM ${TBB_INCLUDE_DIRS})
|
||||
# add_definitions(${TBB_DEFINITIONS})
|
||||
# if(MSVC)
|
||||
# # Suppress implicit linking of the TBB libraries by the Visual Studio compiler.
|
||||
@@ -553,7 +553,7 @@ if (SLIC3R_STATIC AND NOT SLIC3R_STATIC_EXCLUDE_CURL)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
message("OpenSSL include dir: ${OPENSSL_INCLUDE_DIR}")
|
||||
message("OpenSSL libraries: ${OPENSSL_LIBRARIES}")
|
||||
target_include_directories(libcurl INTERFACE ${OPENSSL_INCLUDE_DIR})
|
||||
target_include_directories(libcurl SYSTEM INTERFACE ${OPENSSL_INCLUDE_DIR})
|
||||
target_link_libraries(libcurl INTERFACE ${OPENSSL_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user