Uses cmake to build folly test drivers
[folly.git] / folly / stress-test / CMakeLists.txt
diff --git a/folly/stress-test/CMakeLists.txt b/folly/stress-test/CMakeLists.txt
new file mode 100644 (file)
index 0000000..289efdb
--- /dev/null
@@ -0,0 +1,45 @@
+cmake_minimum_required(VERSION 2.8.5)
+
+set(CMAKE_C_COMPILER clang-native)
+set(CMAKE_CXX_COMPILER clang++-native)
+
+set(CMAKE_BUILD_TYPE Release)
+
+include_directories(
+    /scratch/googletest/googletest/include
+               /scratch/gflags/gflags/build/include
+               /scratch/glog/glog/src
+               ../..
+)
+
+link_directories(
+    /scratch/folly/orig-folly/folly/folly-lib
+    /scratch/glog/glog/glog-lib
+    /scratch/gflags/gflags/build/gflags-lib
+    /scratch/googletest/googletest
+)
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y")
+
+set(FOLLY_LIB folly pthread gflags glog gtest)
+set(RCU_OBJ ../synchronization/.libs/Rcu.o)
+
+# Sequential driver
+add_executable(stress-sequential-folly-map stress-sequential-folly-map.cpp ${RCU_OBJ})
+target_link_libraries(stress-sequential-folly-map ${FOLLY_LIB})
+
+add_executable(stress-sequential-folly-queue stress-sequential-folly-queue.cpp ${RCU_OBJ})
+target_link_libraries(stress-sequential-folly-queue ${FOLLY_LIB})
+
+add_executable(stress-sequential-folly-sync stress-sequential-folly-sync.cpp ${RCU_OBJ})
+target_link_libraries(stress-sequential-folly-sync ${FOLLY_LIB})
+
+# Parallel driver
+add_executable(stress-parallel-folly-map stress-parallel-folly-map.cpp ${RCU_OBJ})
+target_link_libraries(stress-parallel-folly-map ${FOLLY_LIB})
+
+add_executable(stress-parallel-folly-queue stress-parallel-folly-queue.cpp ${RCU_OBJ})
+target_link_libraries(stress-parallel-folly-queue ${FOLLY_LIB})
+
+add_executable(stress-parallel-folly-sync stress-parallel-folly-sync.cpp ${RCU_OBJ})
+target_link_libraries(stress-parallel-folly-sync ${FOLLY_LIB})