瀏覽代碼

实在是搞不定glog和gflags在windows下的编译问题,用boost log和boost option替代算了

tanghai 14 年之前
父節點
當前提交
eaf1c23740
共有 3 個文件被更改,包括 1 次插入15 次删除
  1. 1 9
      Cpp/CMakeLists.txt
  2. 0 2
      Cpp/Platform/Mono/MonoInit.cc
  3. 0 4
      Cpp/Platform/Rpc/RpcSessionTest.cc

+ 1 - 9
Cpp/CMakeLists.txt

@@ -23,12 +23,6 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/Game)
 INCLUDE_DIRECTORIES(ThirdParty)
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/ThirdParty)
 
-FIND_PACKAGE(GLog REQUIRED)
-INCLUDE_DIRECTORIES(${GLOG_INCLUDE_DIRS})
-
-FIND_PACKAGE(GFlags REQUIRED)
-INCLUDE_DIRECTORIES(${GFLAGS_INCLUDE_DIRS})
-
 FIND_PACKAGE(Protobuf REQUIRED)
 INCLUDE_DIRECTORIES(${PROTOBUF_INCLUDE_DIRS})
 
@@ -45,8 +39,6 @@ SET(Boost_USE_STATIC_RUNTIME OFF)
 SET(ThirdPartyLibs
 	gtest
 	gmock
-	${GLOG_LIBRARIES}
-	${GFLAGS_LIBRARIES}
 	${PROTOBUF_LIBRARIES}
 	${Boost_LIBRARIES}
 	${PERFTOOLS_DEBUG_LIBRARIES}
@@ -64,7 +56,7 @@ IF(MSVC)
 	SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:libcd.lib")
 	SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:msvcrtd.lib")
 	SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:msvcprtd.lib")
-	ADD_DEFINITIONS(-DBOOST_ALL_NO_LIB -D_WIN32_WINNT=0x0601 -DGLOG_NO_ABBREVIATED_SEVERITIES -DGOOGLE_GLOG_DLL_DECL=)
+	ADD_DEFINITIONS(-DBOOST_ALL_NO_LIB -D_WIN32_WINNT=0x0601)
 ENDIF()
 
 ADD_SUBDIRECTORY(Platform)

+ 0 - 2
Cpp/Platform/Mono/MonoInit.cc

@@ -1,7 +1,6 @@
 // Copyright: All Rights Reserved
 // Author: egametang@gmail.com (tanghai)
 
-#include <glog/logging.h>
 #include <mono/jit/jit.h>
 #include <mono/metadata/assembly.h>
 #include <mono/metadata/debug-helpers.h>
@@ -31,7 +30,6 @@ void MonoInit::LoadAssembly(const std::string& fileName)
 void MonoInit::InvokeMethod(const std::string& className, const std::string& methodName)
 {
 	MonoImage* image = imageMap[className];
-	CHECK(image) << "not found image: " << className << "::" << methodName;
 	std::string fullName = className + ":" + methodName;
 	MonoMethodDesc* desc = mono_method_desc_new(fullName.c_str(), 1);
 	MonoMethod* monoMethod = mono_method_desc_search_in_image(desc, image);

+ 0 - 4
Cpp/Platform/Rpc/RpcSessionTest.cc

@@ -1,8 +1,6 @@
 #include <boost/bind.hpp>
 #include <boost/asio.hpp>
 #include <gtest/gtest.h>
-#include <gflags/gflags.h>
-#include <glog/logging.h>
 #include "Rpc/RpcSession.h"
 #include "Rpc/RpcServerMock.h"
 
@@ -34,7 +32,5 @@ public:
 int main(int argc, char* argv[])
 {
 	testing::InitGoogleTest(&argc, argv);
-	google::ParseCommandLineFlags(&argc, &argv, true);
-	google::InitGoogleLogging(argv[0]);
 	return RUN_ALL_TESTS();
 }