Skip to content

Commit

Permalink
Add CMake build support for version suffixes
Browse files Browse the repository at this point in the history
Summary:
CMake project versions can only be dot-separated integers. This diff allows us
to additionally specify a suffix, e.g. `-rc3`.

Reviewed By: dulinriley

Differential Revision: D20776302

fbshipit-source-id: ae9b7a4cdd00d955084a6f9c117e4aff32baf60f
  • Loading branch information
willholen authored and facebook-github-bot committed Mar 31, 2020
1 parent 0625dd9 commit 6c2b9f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ endif()
project(Hermes
VERSION 0.4.0
LANGUAGES C CXX)
# Optional suffix like "-rc3"
set(VERSION_SUFFIX "")

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/")

Expand All @@ -65,7 +67,7 @@ set(LLVH_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external/llvh)
include(Hermes)
include(Lit)

set(HERMES_RELEASE_VERSION ${PROJECT_VERSION})
set(HERMES_RELEASE_VERSION ${PROJECT_VERSION}${VERSION_SUFFIX})

# Project options.
set(HERMESVM_GCKIND NONCONTIG_GENERATIONAL
Expand Down

0 comments on commit 6c2b9f6

Please sign in to comment.