Browse Source

增加epoller类文件,并编写了相应的SConscript文件

tanghai 15 years ago
parent
commit
14fd9e9de8
4 changed files with 23 additions and 5 deletions
  1. 1 0
      SConstruct
  2. 13 0
      src/net/SConscript
  3. 0 0
      src/net/epoller_test.cc
  4. 9 5
      src/thread/SConscript

+ 1 - 0
SConstruct

@@ -13,6 +13,7 @@ env.Append(LIBS=[
 	'gflags',
 	'glog',
 	'gtest',
+	'gmock',
 ])
 
 if GetOption('opt') == True:

+ 13 - 0
src/net/SConscript

@@ -0,0 +1,13 @@
+Import('env')
+
+net_env = env.Clone()
+
+net_src = [
+	'epoller.cc'
+]
+
+net_lib = net_env.StaticLibrary('net', net_src)
+
+net_env.Append(LIBS=net_lib)
+
+net_env.Program('epoller_test.cc')

+ 0 - 0
src/net/epoller_test.cc


+ 9 - 5
src/thread/SConscript

@@ -3,11 +3,15 @@ Import('env')
 thread_env = env.Clone()
 
 thread_env.Append(LIBS=[
-	'boost_thread',
+	'boost_thread'
 ])
 
-thread_env.Program('thread_pool_test', 
-[
-	'thread_pool_test.cc',
+thread_src = [
 	'thread_pool.cc',
-])
+]
+
+thread_lib = thread_env.StaticLibrary('thread', thread_src)
+
+thread_env.Append(LIBS=thread_lib)
+
+thread_env.Program('thread_pool_test.cc')