[Bf-blender-cvs] [3857b46] master: Cycles: Don't silence unused macro, remove the macro instead

Sergey Sharybin noreply at git.blender.org
Wed Feb 17 12:42:59 CET 2016


Commit: 3857b4600ff685e6348b79e940f2f38dcaf16326
Author: Sergey Sharybin
Date:   Wed Feb 17 12:40:56 2016 +0100
Branches: master
https://developer.blender.org/rB3857b4600ff685e6348b79e940f2f38dcaf16326

Cycles: Don't silence unused macro, remove the macro instead

It's not really handy to silence something unused hoping for it'll be
used in the future. We can end up with quite some silencing then.

Also made this flag which i find rather useless to NOT cause -Werror
in Cycles code.

===================================================================

M	intern/cycles/CMakeLists.txt
M	intern/cycles/util/util_path.cpp

===================================================================

diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt
index 179cba2..d3ab894 100644
--- a/intern/cycles/CMakeLists.txt
+++ b/intern/cycles/CMakeLists.txt
@@ -202,8 +202,10 @@ endif()
 if(CMAKE_COMPILER_IS_GNUCXX)
 	ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_float_conversion "-Werror=float-conversion")
 	ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_cxxflag_double_promotion "-Werror=double-promotion")
+	ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS _has_no_error_unused_macros "-Wno-error=unused-macros")
 	unset(_has_cxxflag_float_conversion)
 	unset(_has_cxxflag_double_promotion)
+	unset(_has_no_error_unused_macros)
 endif()
 
 
diff --git a/intern/cycles/util/util_path.cpp b/intern/cycles/util/util_path.cpp
index 04a2282..b7aa24a 100644
--- a/intern/cycles/util/util_path.cpp
+++ b/intern/cycles/util/util_path.cpp
@@ -34,14 +34,9 @@ OIIO_NAMESPACE_USING
 #  include <direct.h>
 #else
 #  define DIR_SEP '/'
-#  define DIR_SEP_ALT '\\'
 #  include <dirent.h>
 #endif
 
-#if defined(DIR_SEP_ALT)
-/* quiet unused define warning */
-#endif
-
 #ifdef HAVE_SHLWAPI_H
 #  include <shlwapi.h>
 #endif




More information about the Bf-blender-cvs mailing list