Răsfoiți Sursa

build boost_function_test successfully

tanghai 15 ani în urmă
părinte
comite
062079d20d
5 a modificat fișierele cu 36 adăugiri și 2 ștergeri
  1. 5 0
      .gitignore
  2. 1 1
      SConstruct
  3. 2 1
      src/SConscript
  4. 11 0
      src/experimental/SConscript
  5. 17 0
      src/experimental/boost_function_test.cc

+ 5 - 0
.gitignore

@@ -1,3 +1,8 @@
 .cproject
 .project
 .pydevproject
+
+.sconsign.dblite
+
+dbg/
+opt/

+ 1 - 1
SConstruct

@@ -14,5 +14,5 @@ ParseOptions()
 
 Export('env')
 
-SConscript('src/SConscript' % x, build_dir=target_dir)
+SConscript('src/SConscript', build_dir=env['mode'])
 

+ 2 - 1
src/SConscript

@@ -5,4 +5,5 @@ subdirs = [
 ]
 
 for subdir in subdirs:
-	SConscript('%s/%s/SConscript' % (env['srcroot'], x), build_dir=target_dir)
+	target_dir = env['mode'] + subdir
+	SConscript('%s/SConscript' % subdir)

+ 11 - 0
src/experimental/SConscript

@@ -0,0 +1,11 @@
+Import('env')
+
+experimental_env = env.Clone()
+
+experimental_env.Append(LIBS=[
+	'gflags',
+	'glog',
+	'gtest',
+])
+
+experimental_env.Program('boost_function_test.cc')

+ 17 - 0
src/experimental/boost_function_test.cc

@@ -0,0 +1,17 @@
+//  Created on: 2010-6-28
+//      Author: tanghai
+
+#include <boost/function.hpp>
+#include <gtest/gtest.h>
+#include <gflags/gflags.h>
+#include <glog/logging.h>
+
+
+
+int main(int argc, char* argv[])
+{
+	google::ParseCommandLineFlags(&argc, &argv, true);
+	google::InitGoogleLogging(argv[0]);
+	testing::InitGoogleTest(&argc, argv);
+	return RUN_ALL_TESTS();
+}