Revision: 8524 https://osdn.net/projects/ttssh2/scm/svn/commits/8524 Author: zmatsuo Date: 2020-02-02 02:24:19 +0900 (Sun, 02 Feb 2020) Log Message: ----------- cmake ビルドで MORE_WARNING=ON 時、より警告が出るようにした - いつも _CRT_SECURE_NO_DEPRECATE を define していた - MORE_WARNING=ON 時は defineしないようにした Modified Paths: -------------- trunk/CMakeLists.txt -------------- next part -------------- Modified: trunk/CMakeLists.txt =================================================================== --- trunk/CMakeLists.txt 2020-02-01 17:12:39 UTC (rev 8523) +++ trunk/CMakeLists.txt 2020-02-01 17:24:19 UTC (rev 8524) @@ -28,8 +28,6 @@ string(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE}) string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG}) string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE}) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_CRT_SECURE_NO_DEPRECATE") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D_CRT_SECURE_NO_DEPRECATE") if (MORE_WARNING) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4") @@ -38,6 +36,8 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /analyze") endif() else() + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_CRT_SECURE_NO_DEPRECATE") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D_CRT_SECURE_NO_DEPRECATE") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3") endif()