From 58bf6a8c9ae74436717cdc34c936e1e3426ff3a4 Mon Sep 17 00:00:00 2001 From: Vlad Didenko Date: Thu, 18 Aug 2016 12:43:45 -0500 Subject: [PATCH 1/2] [C++]: Retarget to CMake version 3.0.2 --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ded2079533..c63d34364e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. # -cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR) + +cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR) +cmake_policy(VERSION 3.0.2) include(ExternalProject) include(CheckLibraryExists) From bb7d9c435c4f50d79b3a147c9d39984ad1a6cd4e Mon Sep 17 00:00:00 2001 From: Vlad Didenko Date: Thu, 18 Aug 2016 12:56:58 -0500 Subject: [PATCH 2/2] [C++]: Share version information between Java to C++ builds --- CMakeLists.txt | 5 +++++ build.gradle | 2 +- version.txt | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 version.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index c63d34364e..de48b2452e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,11 @@ cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR) cmake_policy(VERSION 3.0.2) +file(STRINGS version.txt SBE_VERSION_TXT LIMIT_COUNT 1 REGEX "^[0-9]+(\\.[0-9])+") +string(REGEX REPLACE "^([0-9]+(\\.[0-9])+).*$" "\\1" SBE_VERSION_NUMERIC "${SBE_VERSION_TXT}") + +project("sbe" VERSION "${SBE_VERSION_NUMERIC}") + include(ExternalProject) include(CheckLibraryExists) diff --git a/build.gradle b/build.gradle index 34d2d40a56..05ad7fbff3 100644 --- a/build.gradle +++ b/build.gradle @@ -21,7 +21,7 @@ plugins { defaultTasks 'clean', 'build', 'shadowJar', 'install' def sbeGroup = 'uk.co.real-logic' -def sbeVersion = '1.5.1-SNAPSHOT' +def sbeVersion = new File('version.txt').text.trim() group = sbeGroup version = sbeVersion diff --git a/version.txt b/version.txt new file mode 100644 index 0000000000..f825f7c7f1 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +1.5.1-SNAPSHOT