From 0f5b27deb8c6fa091d9fdf57c51f7a879c9756a7 Mon Sep 17 00:00:00 2001 From: Stephen Oman Date: Fri, 5 Jul 2024 19:18:54 +0100 Subject: [PATCH] Remove the rcXX suffix from the cmake version as it doesn't like the Python versioning format --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 38e4894ca..e2e28d390 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,8 @@ cmake_minimum_required(VERSION 3.15) file(STRINGS "version.txt" NLE_VERSION) -project(nle VERSION ${NLE_VERSION}) +# Remove any rcXX suffix from the version number as CMake doesn't like it +string(REGEX REPLACE "rc[0-9+]$" "" CMAKE_NLE_VERSION ${NLE_VERSION}) +project(nle VERSION ${CMAKE_NLE_VERSION}) if(CMAKE_BUILD_TYPE MATCHES Debug) message("Debug build.") @@ -30,7 +32,7 @@ else() message("Some other build type.") endif() -message(STATUS "Building nle backend version: ${NLE_VERSION}") +message(STATUS "Building nle backend version: ${CMAKE_NLE_VERSION}") set(CMAKE_POSITION_INDEPENDENT_CODE ON)