From e6c97eab43411c700ecac4d1a968818f4030085a Mon Sep 17 00:00:00 2001
From: Neal Gompa <ngompa13@gmail.com>
Date: Sat, 17 Feb 2018 10:05:13 -0500
Subject: [PATCH] benchmarks: Configure mir-perf-framework with the Mir version
mir-perf-framework is released alongside the rest of Mir, so it should
be versioned in the same manner.
Signed-off-by: Neal Gompa <ngompa13@gmail.com>
---
.gitignore | 1 +
benchmarks/CMakeLists.txt | 3 +++
.../{mir_perf_framework_setup.py => mir_perf_framework_setup.py.in} | 2 +-
3 files changed, 5 insertions(+), 1 deletion(-)
rename benchmarks/{mir_perf_framework_setup.py => mir_perf_framework_setup.py.in} (77%)
diff --git a/.gitignore b/.gitignore
index 69ad3f9..8f662b2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
.idea
.project
+benchmarks/mir_perf_framework_setup.py
include/server/mir/version.h
include/client/mir_toolkit/version.h
include/miral/version.h
diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt
index c99d3a0..a394f96 100644
--- a/benchmarks/CMakeLists.txt
+++ b/benchmarks/CMakeLists.txt
@@ -25,6 +25,9 @@ target_link_libraries(benchmark_multiplexing_dispatchable
mircommon
)
+# Configure the version in the setup.py
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/mir_perf_framework_setup.py.in ${CMAKE_CURRENT_SOURCE_DIR}/mir_perf_framework_setup.py @ONLY)
+
# Note: We need to write \$ENV{DESTDIR} (note the \$) to make
# CMake replace the DESTDIR variable at installation time rather
# than configuration time
diff --git a/benchmarks/mir_perf_framework_setup.py b/benchmarks/mir_perf_framework_setup.py.in
similarity index 77%
rename from benchmarks/mir_perf_framework_setup.py
rename to benchmarks/mir_perf_framework_setup.py.in
index e7d8844..9bb34aa 100644
--- a/benchmarks/mir_perf_framework_setup.py
+++ b/benchmarks/mir_perf_framework_setup.py.in
@@ -1,5 +1,5 @@
from distutils.core import setup
setup(name='mir_perf_framework',
- version='0.1',
+ version='@MIR_VERSION@',
packages=['mir_perf_framework'])
--
2.14.3