[Ttssh2-commit] [8529] cmakeビルドでgcc,clang使用時、警告が多いので一部抑制

scmno****@osdn***** scmno****@osdn*****
2020年 2月 7日 (金) 01:07:50 JST


Revision: 8529
          https://osdn.net/projects/ttssh2/scm/svn/commits/8529
Author:   zmatsuo
Date:     2020-02-07 01:07:50 +0900 (Fri, 07 Feb 2020)
Log Message:
-----------
cmakeビルドでgcc,clang使用時、警告が多いので一部抑制

- -Wno-sign-compare,-Wno-pointer-sign

Modified Paths:
--------------
    trunk/CMakeLists.txt

-------------- next part --------------
Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt	2020-02-06 16:07:40 UTC (rev 8528)
+++ trunk/CMakeLists.txt	2020-02-06 16:07:50 UTC (rev 8529)
@@ -55,8 +55,10 @@
 elseif(MINGW)
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_WIN32_WINNT=${_WIN32_WINNT}")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_WIN32_WINNT=${_WIN32_WINNT}")
-  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter -static -ffunction-sections -fdata-sections ${C_ONLY_FLAGS}")
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter -static -ffunction-sections -fdata-sections")
+  set(CMAKE_C_CXX_WARNING_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-sign-compare")
+  set(CMAKE_C_WARNING_FLAGS "${CMAKE_C_CXX_WARNING_FLAGS}  -Wno-pointer-sign")
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_WARNING_FLAGS} -static -ffunction-sections -fdata-sections ${C_ONLY_FLAGS}")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_CXX_WARNING_FLAGS} -static -ffunction-sections -fdata-sections")
   set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
   set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
   if (CMAKE_C_COMPILER_ID STREQUAL "GNU")


Ttssh2-commit メーリングリストの案内