Fix warning related to unused-function.

Signed-off-by: Jackie9527 <80555200+Jackie9527@users.noreply.github.com>
pull/5083/head
Jackie9527 2023-04-01 10:19:52 +08:00
parent b8877798ed
commit fbf8799cb5
2 changed files with 8 additions and 1 deletions

View File

@ -1198,7 +1198,6 @@ IF (ASSIMP_WARNINGS_AS_ERRORS)
IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) # clang-cl IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) # clang-cl
TARGET_COMPILE_OPTIONS(assimp PRIVATE -Wall -Werror TARGET_COMPILE_OPTIONS(assimp PRIVATE -Wall -Werror
-Wno-unused-function
-Wno-microsoft-enum-value -Wno-microsoft-enum-value
-Wno-switch-enum -Wno-switch-enum
-Wno-covered-switch-default -Wno-covered-switch-default

View File

@ -48,6 +48,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-function"
#endif #endif
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-function"
#endif
#ifndef STB_USE_HUNTER #ifndef STB_USE_HUNTER
/* Use prefixed names for the symbols from stb_image as it is a very commonly embedded library. /* Use prefixed names for the symbols from stb_image as it is a very commonly embedded library.
Including vanilla stb_image symbols causes duplicate symbol problems if assimp is linked Including vanilla stb_image symbols causes duplicate symbol problems if assimp is linked
@ -114,3 +119,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif #endif
#if defined(__clang__)
#pragma clang diagnostic pop
#endif