From 1d8eb39f62780a129a0d799bc6ceee3f55c024da Mon Sep 17 00:00:00 2001 From: "Jeremy R. Fishman" Date: Thu, 31 Jan 2013 15:05:28 -0800 Subject: [PATCH] cmake build for mstress benchmark --- CMakeLists.txt | 1 + benchmarks/mstress/CMakeLists.txt | 36 ++++++++++++++++++++++++++++ benchmarks/mstress/mstress_client.cc | 2 +- 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 benchmarks/mstress/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e632976f..eefe6d46c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -165,6 +165,7 @@ add_subdirectory (${KFS_DIR_PREFIX}src/cc/qcdio src/cc/qcdio) add_subdirectory (${KFS_DIR_PREFIX}src/cc/qcrs src/cc/qcrs) add_subdirectory (${KFS_DIR_PREFIX}examples/cc examples/cc) +add_subdirectory (${KFS_DIR_PREFIX}benchmarks/mstress benchmarks/mstress) IF (NOT ${JAVA_INCLUDE_PATH} STREQUAL "" AND NOT DEFINED JNI_FOUND) set(JNI_FOUND TRUE) diff --git a/benchmarks/mstress/CMakeLists.txt b/benchmarks/mstress/CMakeLists.txt new file mode 100644 index 000000000..c1f370eea --- /dev/null +++ b/benchmarks/mstress/CMakeLists.txt @@ -0,0 +1,36 @@ +# $Id$ +# +# Copyright 2012 Quantcast Corp. +# +# This file is part of Quantcast File System (QFS). +# +# Licensed under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. See the License for the specific language governing +# permissions and limitations under the License. +# +# Build the C++ mstress benchmark +# + +add_executable (mstress_client mstress_client.cc) +IF (USE_STATIC_LIB_LINKAGE) + add_dependencies (mstress_client kfsClient) + target_link_libraries (mstress_client kfsClient qcdio pthread) +ELSE (USE_STATIC_LIB_LINKAGE) + add_dependencies (mstress_client kfsClient-shared) + target_link_libraries (mstress_client kfsClient-shared qcdio-shared pthread) +ENDIF (USE_STATIC_LIB_LINKAGE) + +IF (NOT APPLE) + target_link_libraries (rt) +ENDIF (NOT APPLE) + +install (TARGETS mstress_client + RUNTIME DESTINATION bin/benchmarks) diff --git a/benchmarks/mstress/mstress_client.cc b/benchmarks/mstress/mstress_client.cc index 5cddb0364..70950cf70 100644 --- a/benchmarks/mstress/mstress_client.cc +++ b/benchmarks/mstress/mstress_client.cc @@ -38,7 +38,7 @@ using namespace std; -#include "KfsClient.h" +#include "libclient/KfsClient.h" FILE* logFile = stdout;