diff --git a/CMakeLists.txt b/CMakeLists.txt index ded2079533..de48b2452e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,14 @@ # 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) + +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