Move GLog/GFlags to extern/
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 4 Jan 2016 11:47:36 +0000 (16:47 +0500)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 4 Jan 2016 14:39:13 +0000 (19:39 +0500)
This is where the libraries belongs to actually, they are not only used by
Libmv now, but also by tests and Cycles.

71 files changed:
CMakeLists.txt
extern/CMakeLists.txt
extern/gflags/AUTHORS.txt [moved from extern/libmv/third_party/gflags/AUTHORS.txt with 100% similarity]
extern/gflags/CMakeLists.txt [moved from extern/libmv/third_party/gflags/CMakeLists.txt with 77% similarity]
extern/gflags/COPYING.txt [moved from extern/libmv/third_party/gflags/COPYING.txt with 100% similarity]
extern/gflags/ChangeLog.txt [moved from extern/libmv/third_party/gflags/ChangeLog.txt with 100% similarity]
extern/gflags/NEWS.txt [moved from extern/libmv/third_party/gflags/NEWS.txt with 100% similarity]
extern/gflags/README.libmv [moved from extern/libmv/third_party/gflags/README.libmv with 100% similarity]
extern/gflags/README.md [moved from extern/libmv/third_party/gflags/README.md with 100% similarity]
extern/gflags/src/config.h [moved from extern/libmv/third_party/gflags/config.h with 100% similarity]
extern/gflags/src/gflags.cc [moved from extern/libmv/third_party/gflags/gflags.cc with 100% similarity]
extern/gflags/src/gflags/gflags.h [moved from extern/libmv/third_party/gflags/gflags/gflags.h with 100% similarity]
extern/gflags/src/gflags/gflags_completions.h [moved from extern/libmv/third_party/gflags/gflags/gflags_completions.h with 100% similarity]
extern/gflags/src/gflags/gflags_declare.h [moved from extern/libmv/third_party/gflags/gflags/gflags_declare.h with 100% similarity]
extern/gflags/src/gflags/gflags_gflags.h [moved from extern/libmv/third_party/gflags/gflags/gflags_gflags.h with 100% similarity]
extern/gflags/src/gflags_completions.cc [moved from extern/libmv/third_party/gflags/gflags_completions.cc with 100% similarity]
extern/gflags/src/gflags_reporting.cc [moved from extern/libmv/third_party/gflags/gflags_reporting.cc with 100% similarity]
extern/gflags/src/mutex.h [moved from extern/libmv/third_party/gflags/mutex.h with 100% similarity]
extern/gflags/src/util.h [moved from extern/libmv/third_party/gflags/util.h with 100% similarity]
extern/gflags/src/windows_port.cc [moved from extern/libmv/third_party/gflags/windows_port.cc with 100% similarity]
extern/gflags/src/windows_port.h [moved from extern/libmv/third_party/gflags/windows_port.h with 100% similarity]
extern/glog/AUTHORS [moved from extern/libmv/third_party/glog/AUTHORS with 100% similarity]
extern/glog/CMakeLists.txt [moved from extern/libmv/third_party/glog/CMakeLists.txt with 95% similarity]
extern/glog/COPYING [moved from extern/libmv/third_party/glog/COPYING with 100% similarity]
extern/glog/ChangeLog [moved from extern/libmv/third_party/glog/ChangeLog with 100% similarity]
extern/glog/NEWS [moved from extern/libmv/third_party/glog/NEWS with 100% similarity]
extern/glog/README [moved from extern/libmv/third_party/glog/README with 100% similarity]
extern/glog/README.libmv [moved from extern/libmv/third_party/glog/README.libmv with 100% similarity]
extern/glog/src/base/commandlineflags.h [moved from extern/libmv/third_party/glog/src/base/commandlineflags.h with 100% similarity]
extern/glog/src/base/googleinit.h [moved from extern/libmv/third_party/glog/src/base/googleinit.h with 100% similarity]
extern/glog/src/base/mutex.h [moved from extern/libmv/third_party/glog/src/base/mutex.h with 100% similarity]
extern/glog/src/config.h [moved from extern/libmv/third_party/glog/src/config.h with 100% similarity]
extern/glog/src/config_freebsd.h [moved from extern/libmv/third_party/glog/src/config_freebsd.h with 100% similarity]
extern/glog/src/config_hurd.h [moved from extern/libmv/third_party/glog/src/config_hurd.h with 100% similarity]
extern/glog/src/config_linux.h [moved from extern/libmv/third_party/glog/src/config_linux.h with 100% similarity]
extern/glog/src/config_mac.h [moved from extern/libmv/third_party/glog/src/config_mac.h with 100% similarity]
extern/glog/src/demangle.cc [moved from extern/libmv/third_party/glog/src/demangle.cc with 100% similarity]
extern/glog/src/demangle.h [moved from extern/libmv/third_party/glog/src/demangle.h with 100% similarity]
extern/glog/src/glog/log_severity.h [moved from extern/libmv/third_party/glog/src/glog/log_severity.h with 100% similarity]
extern/glog/src/glog/logging.h [moved from extern/libmv/third_party/glog/src/glog/logging.h with 100% similarity]
extern/glog/src/glog/raw_logging.h [moved from extern/libmv/third_party/glog/src/glog/raw_logging.h with 100% similarity]
extern/glog/src/glog/vlog_is_on.h [moved from extern/libmv/third_party/glog/src/glog/vlog_is_on.h with 100% similarity]
extern/glog/src/logging.cc [moved from extern/libmv/third_party/glog/src/logging.cc with 100% similarity]
extern/glog/src/raw_logging.cc [moved from extern/libmv/third_party/glog/src/raw_logging.cc with 100% similarity]
extern/glog/src/signalhandler.cc [moved from extern/libmv/third_party/glog/src/signalhandler.cc with 100% similarity]
extern/glog/src/stacktrace.h [moved from extern/libmv/third_party/glog/src/stacktrace.h with 100% similarity]
extern/glog/src/stacktrace_generic-inl.h [moved from extern/libmv/third_party/glog/src/stacktrace_generic-inl.h with 100% similarity]
extern/glog/src/stacktrace_libunwind-inl.h [moved from extern/libmv/third_party/glog/src/stacktrace_libunwind-inl.h with 100% similarity]
extern/glog/src/stacktrace_powerpc-inl.h [moved from extern/libmv/third_party/glog/src/stacktrace_powerpc-inl.h with 100% similarity]
extern/glog/src/stacktrace_x86-inl.h [moved from extern/libmv/third_party/glog/src/stacktrace_x86-inl.h with 100% similarity]
extern/glog/src/stacktrace_x86_64-inl.h [moved from extern/libmv/third_party/glog/src/stacktrace_x86_64-inl.h with 100% similarity]
extern/glog/src/symbolize.cc [moved from extern/libmv/third_party/glog/src/symbolize.cc with 100% similarity]
extern/glog/src/symbolize.h [moved from extern/libmv/third_party/glog/src/symbolize.h with 100% similarity]
extern/glog/src/utilities.cc [moved from extern/libmv/third_party/glog/src/utilities.cc with 100% similarity]
extern/glog/src/utilities.h [moved from extern/libmv/third_party/glog/src/utilities.h with 100% similarity]
extern/glog/src/vlog_is_on.cc [moved from extern/libmv/third_party/glog/src/vlog_is_on.cc with 100% similarity]
extern/glog/src/windows/config.h [moved from extern/libmv/third_party/glog/src/windows/config.h with 100% similarity]
extern/glog/src/windows/glog/log_severity.h [moved from extern/libmv/third_party/glog/src/windows/glog/log_severity.h with 100% similarity]
extern/glog/src/windows/glog/logging.h [moved from extern/libmv/third_party/glog/src/windows/glog/logging.h with 100% similarity]
extern/glog/src/windows/glog/raw_logging.h [moved from extern/libmv/third_party/glog/src/windows/glog/raw_logging.h with 100% similarity]
extern/glog/src/windows/glog/vlog_is_on.h [moved from extern/libmv/third_party/glog/src/windows/glog/vlog_is_on.h with 100% similarity]
extern/glog/src/windows/port.cc [moved from extern/libmv/third_party/glog/src/windows/port.cc with 100% similarity]
extern/glog/src/windows/port.h [moved from extern/libmv/third_party/glog/src/windows/port.h with 100% similarity]
extern/glog/src/windows/preprocess.sh [moved from extern/libmv/third_party/glog/src/windows/preprocess.sh with 100% similarity]
extern/libmv/CMakeLists.txt
extern/libmv/bundle.sh
extern/libmv/files.txt
extern/libmv/mkfiles.sh
extern/libmv/third_party/CMakeLists.txt
extern/libmv/third_party/ceres/CMakeLists.txt
intern/cycles/cmake/external_libs.cmake

index 79844bb0e50b38be58281accf0ef8d429dd53fd5..b04a771f17c887217e2c6bba649555daf009ed7e 100644 (file)
@@ -2585,6 +2585,21 @@ if(WITH_PYTHON_MODULE)
        add_definitions(-DPy_ENABLE_SHARED)
 endif()
 
+#-----------------------------------------------------------------------------
+# Configure GLog/GFlags
+
+if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
+       set(GLOG_DEFINES
+               -DGOOGLE_GLOG_DLL_DECL=
+       )
+
+       set(GFLAGS_DEFINES
+               -DGFLAGS_DLL_DEFINE_FLAG=
+               -DGFLAGS_DLL_DECLARE_FLAG=
+               -DGFLAGS_DLL_DECL=
+       )
+endif()
+
 #-----------------------------------------------------------------------------
 # Extra compile flags
 
index 640de9d80e7161ba89e54731e873b8d5b9b80c3e..3723a423eecc6282dbe3111ac4f97849be80171a 100644 (file)
@@ -86,6 +86,11 @@ if(WITH_X11 AND WITH_GHOST_XDND)
        add_subdirectory(xdnd)
 endif()
 
+if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
+       add_subdirectory(gflags)
+       add_subdirectory(glog)
+endif()
+
 if(WITH_GTESTS)
        add_subdirectory(gtest)
 endif()
similarity index 77%
rename from extern/libmv/third_party/gflags/CMakeLists.txt
rename to extern/gflags/CMakeLists.txt
index 99e2898e1310868f2e70e4fe8c4dcdaaa735fdf9..8977fcca457bff8a10bcab0717019a472255a54d 100644 (file)
 # ***** END GPL LICENSE BLOCK *****
 
 set(INC
-       .
-       gflags
+       src
+       src/gflags
 )
 
 set(INC_SYS
 )
 
 set(SRC
-       gflags.cc
-       gflags_completions.cc
-       gflags_reporting.cc
+       src/gflags.cc
+       src/gflags_completions.cc
+       src/gflags_reporting.cc
 
-       config.h
-       gflags/gflags_completions.h
-       gflags/gflags_declare.h
-       gflags/gflags_gflags.h
-       gflags/gflags.h
-       mutex.h
-       util.h
+       src/config.h
+       src/gflags/gflags_completions.h
+       src/gflags/gflags_declare.h
+       src/gflags/gflags_gflags.h
+       src/gflags/gflags.h
+       src/mutex.h
+       src/util.h
 )
 
 if(WIN32)
        list(APPEND SRC
-               windows_port.cc
-               windows_port.h
+               src/windows_port.cc
+               src/windows_port.h
        )
 endif()
 
+add_definitions(${GFLAGS_DEFINES})
+
 blender_add_lib(extern_gflags "${SRC}" "${INC}" "${INC_SYS}")
similarity index 95%
rename from extern/libmv/third_party/glog/CMakeLists.txt
rename to extern/glog/CMakeLists.txt
index 469df11e94b08dbda2fc95d6be761778216aa3a8..15e6aff9714e0ce8c55d71fb1a53777f5b968d3d 100644 (file)
@@ -24,7 +24,7 @@
 
 set(INC
        src
-       ../gflags
+       ../gflags/src
 )
 
 set(INC_SYS
@@ -86,4 +86,7 @@ else()
        )
 endif()
 
+add_definitions(${GFLAGS_DEFINES})
+add_definitions(${GLOG_DEFINES})
+
 blender_add_lib(extern_glog "${SRC}" "${INC}" "${INC_SYS}")
index a222c22447f7b47bea5218c2f1055c344439ce21..c4d27c24f093cd568865326ee211129926a51c8c 100644 (file)
@@ -49,17 +49,15 @@ else()
        message(FATAL_ERROR "Unable to find shared_ptr.")
 endif()
 
-add_definitions(-DGOOGLE_GLOG_DLL_DECL=)
-add_definitions(-DGFLAGS_DLL_DEFINE_FLAG=)
-add_definitions(-DGFLAGS_DLL_DECLARE_FLAG=)
-add_definitions(-DGFLAGS_DLL_DECL=)
+add_definitions(${GFLAGS_DEFINES})
+add_definitions(${GLOG_DEFINES})
 
 add_subdirectory(third_party)
 
 if(WITH_LIBMV)
        list(APPEND INC
-               third_party/gflags
-               third_party/glog/src
+               ../gflags/src
+               ../glog/src
                third_party/ceres/include
                third_party/ceres/config
                ../../intern/guardedalloc
index 53686f435460fd537bb92d15463bfe1a17465150..da465e5f93cbf4e65949687b531a5d50a8b93bdf 100755 (executable)
@@ -19,10 +19,7 @@ git --git-dir $tmp/libmv/.git --work-tree $tmp/libmv log -n 50 > ChangeLog
 find libmv -type f -exec rm -rf {} \;
 find third_party -type f \
     -not -iwholename '*third_party/ceres*' \
-    -not -iwholename '*third_party/SConscript*' \
     -not -iwholename '*third_party/CMakeLists.txt*' \
-    -not -iwholename '*third_party/gflags/CMakeLists.txt*' \
-    -not -iwholename '*third_party/glog/CMakeLists.txt*' \
     -exec rm -rf {} \;
 
 cat "files.txt" | while read f; do
@@ -32,19 +29,11 @@ done
 
 rm -rf $tmp
 
-chmod 664 ./third_party/glog/src/windows/*.cc ./third_party/glog/src/windows/*.h ./third_party/glog/src/windows/glog/*.h
-
 sources=`find ./libmv -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | grep -v _test.cc | grep -v test_data_sets | sed -r 's/^\.\//\t\t/' | sort -d`
 headers=`find ./libmv -type f -iname '*.h' | grep -v test_data_sets | sed -r 's/^\.\//\t\t/' | sort -d`
 
-third_sources=`find ./third_party -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | grep -v glog | grep -v gflags | grep -v ceres | sed -r 's/^\.\//\t\t/' | sort -d`
-third_headers=`find ./third_party -type f -iname '*.h' | grep -v glog | grep -v gflags | grep -v ceres | sed -r 's/^\.\//\t\t/' | sort -d`
-
-third_glog_sources=`find ./third_party -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | grep glog | grep -v windows | sed -r 's/^\.\//\t\t\t/' | sort -d`
-third_glog_headers=`find ./third_party -type f -iname '*.h' | grep glog | grep -v windows | sed -r 's/^\.\//\t\t\t/' | sort -d`
-
-third_gflags_sources=`find ./third_party -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | grep gflags | grep -v windows | sed -r 's/^\.\//\t\t/' | sort -d`
-third_gflags_headers=`find ./third_party -type f -iname '*.h' | grep gflags | grep -v windows | sed -r 's/^\.\//\t\t/' | sort -d`
+third_sources=`find ./third_party -type f -iname '*.cc' -or -iname '*.cpp' -or -iname '*.c' | grep -v ceres | sed -r 's/^\.\//\t\t/' | sort -d`
+third_headers=`find ./third_party -type f -iname '*.h' | grep -v ceres | sed -r 's/^\.\//\t\t/' | sort -d`
 
 tests=`find ./libmv -type f -iname '*_test.cc' | sort -d | awk ' { name=gensub(".*/([A-Za-z_]+)_test.cc", "\\\\1", $1); printf("\t\tBLENDER_SRC_GTEST(\"libmv_%s\" \"%s\" \"libmv_test_dataset;extern_libmv;extern_ceres\")\n", name, $1) } '`
 
@@ -55,10 +44,6 @@ win_src=""
 for x in $src_dir $src_third_dir; do
   t=""
 
-  if test  `echo "$x" | grep -c glog ` -eq 1; then
-    continue;
-  fi
-
   if stat $x/*.cpp > /dev/null 2>&1; then
     t="    src += env.Glob('`echo $x'/*.cpp'`')"
   fi
@@ -155,8 +140,8 @@ add_subdirectory(third_party)
 
 if(WITH_LIBMV)
        list(APPEND INC
-               third_party/gflags
-               third_party/glog/src
+               ../gflags
+               ../glog/src
                third_party/ceres/include
                third_party/ceres/config
                ../../intern/guardedalloc
index d3a7993ea6b18d75a4fc84b2963ede627c1e69e6..223066bb02f1e003e749b83e962e38f3476e7b3c 100644 (file)
@@ -133,66 +133,6 @@ libmv/tracking/track_region.cc
 libmv/tracking/track_region.h
 libmv/tracking/trklt_region_tracker.cc
 libmv/tracking/trklt_region_tracker.h
-third_party/gflags/AUTHORS.txt
-third_party/gflags/ChangeLog.txt
-third_party/gflags/config.h
-third_party/gflags/COPYING.txt
-third_party/gflags/gflags.cc
-third_party/gflags/gflags_completions.cc
-third_party/gflags/gflags/gflags_completions.h
-third_party/gflags/gflags/gflags_declare.h
-third_party/gflags/gflags/gflags_gflags.h
-third_party/gflags/gflags/gflags.h
-third_party/gflags/gflags_reporting.cc
-third_party/gflags/mutex.h
-third_party/gflags/NEWS.txt
-third_party/gflags/README.libmv
-third_party/gflags/README.md
-third_party/gflags/util.h
-third_party/gflags/windows_port.cc
-third_party/gflags/windows_port.h
-third_party/glog/AUTHORS
-third_party/glog/ChangeLog
-third_party/glog/COPYING
-third_party/glog/NEWS
-third_party/glog/README
-third_party/glog/README.libmv
-third_party/glog/src/base/commandlineflags.h
-third_party/glog/src/base/googleinit.h
-third_party/glog/src/base/mutex.h
-third_party/glog/src/config_freebsd.h
-third_party/glog/src/config.h
-third_party/glog/src/config_hurd.h
-third_party/glog/src/config_linux.h
-third_party/glog/src/config_mac.h
-third_party/glog/src/demangle.cc
-third_party/glog/src/demangle.h
-third_party/glog/src/glog/logging.h
-third_party/glog/src/glog/log_severity.h
-third_party/glog/src/glog/raw_logging.h
-third_party/glog/src/glog/vlog_is_on.h
-third_party/glog/src/logging.cc
-third_party/glog/src/raw_logging.cc
-third_party/glog/src/signalhandler.cc
-third_party/glog/src/stacktrace_generic-inl.h
-third_party/glog/src/stacktrace.h
-third_party/glog/src/stacktrace_libunwind-inl.h
-third_party/glog/src/stacktrace_powerpc-inl.h
-third_party/glog/src/stacktrace_x86_64-inl.h
-third_party/glog/src/stacktrace_x86-inl.h
-third_party/glog/src/symbolize.cc
-third_party/glog/src/symbolize.h
-third_party/glog/src/utilities.cc
-third_party/glog/src/utilities.h
-third_party/glog/src/vlog_is_on.cc
-third_party/glog/src/windows/config.h
-third_party/glog/src/windows/glog/logging.h
-third_party/glog/src/windows/glog/log_severity.h
-third_party/glog/src/windows/glog/raw_logging.h
-third_party/glog/src/windows/glog/vlog_is_on.h
-third_party/glog/src/windows/port.cc
-third_party/glog/src/windows/port.h
-third_party/glog/src/windows/preprocess.sh
 third_party/msinttypes/inttypes.h
 third_party/msinttypes/README.libmv
 third_party/msinttypes/stdint.h
index 281d07cd839379124411c0adc8c880a131f30c59..618070f0a8117ae03c8c2ac1691334329524e195 100755 (executable)
@@ -3,6 +3,4 @@
 find ./libmv/ -type f | sed -r 's/^\.\///' | sort > files.txt
 find ./third_party/ -mindepth 2 -type f | \
     grep -v third_party/ceres | \
-    grep -v third_party/gflags/CMakeLists.txt | \
-    grep -v third_party/glog/CMakeLists.txt | \
     sed -r 's/^\.\///' | sort >> files.txt
index 660b39e3d53ae17e66d6f19e10eea9ba0a080e59..e54d5fbc5cf7afbb4690a6ba5cf4fd0ca997a175 100644 (file)
@@ -1,8 +1,26 @@
+# ***** BEGIN GPL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# The Original Code is Copyright (C) 2016, Blender Foundation
+# All rights reserved.
+#
+# Contributor(s): Sergey Sharybin.
+#
+# ***** END GPL LICENSE BLOCK *****
+
 if(WITH_LIBMV)
        add_subdirectory(ceres)
 endif()
-
-if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
-       add_subdirectory(gflags)
-       add_subdirectory(glog)
-endif()
index cc72faa392ec61ab7e757d8db961c4eb342d7e60..024fcdef8065eafe60aafe21830c16a72a7454f6 100644 (file)
@@ -31,7 +31,7 @@ set(INC
        include
        internal
        config
-       ../gflags
+       ../../../gflags/src
        ../../
 )
 
@@ -298,7 +298,7 @@ endif()
 
 if(WIN32)
        list(APPEND INC
-               ../glog/src/windows
+               ../../../glog/src/windows
        )
 
        if(NOT MINGW)
@@ -308,7 +308,7 @@ if(WIN32)
        endif()
 else()
        list(APPEND INC
-               ../glog/src
+               ../../../glog/src
        )
 endif()
 
index 10a166b6e443810e09e46667cbd7a802c7502067..56ab8bed6e85e2bc30d30a9dfeca5e15d65690fd 100644 (file)
@@ -132,11 +132,11 @@ if(CYCLES_STANDALONE_REPOSITORY)
        unset(_lib_DIR)
 else()
        if(WIN32)
-               set(GLOG_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/libmv/third_party/glog/src/windows)
-               set(GFLAGS_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/libmv/third_party/gflags)
+               set(GLOG_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/glog/src/windows)
+               set(GFLAGS_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/gflags/src)
        else()
-               set(GLOG_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/libmv/third_party/glog/src)
-               set(GFLAGS_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/libmv/third_party/gflags)
+               set(GLOG_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/glog/src)
+               set(GFLAGS_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/gflags/src)
        endif()
        set(GFLAGS_NAMESPACE "gflags")
        set(LLVM_LIBRARIES ${LLVM_LIBRARY})