mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 06:34:36 +00:00
Set TRACY_VERSION_STRING directly in version.cmake.
This commit is contained in:
parent
776b08f2e0
commit
375f4526df
@ -3,11 +3,6 @@ cmake_minimum_required(VERSION 3.10)
|
|||||||
# Run version helper script
|
# Run version helper script
|
||||||
include(cmake/version.cmake)
|
include(cmake/version.cmake)
|
||||||
|
|
||||||
set(TRACY_VERSION_MAJOR ${major})
|
|
||||||
set(TRACY_VERSION_MINOR ${minor})
|
|
||||||
set(TRACY_VERSION_PATCH ${patch})
|
|
||||||
set(TRACY_VERSION_STRING "${TRACY_VERSION_MAJOR}.${TRACY_VERSION_MINOR}.${TRACY_VERSION_PATCH}")
|
|
||||||
|
|
||||||
project(Tracy LANGUAGES CXX VERSION ${TRACY_VERSION_STRING})
|
project(Tracy LANGUAGES CXX VERSION ${TRACY_VERSION_STRING})
|
||||||
|
|
||||||
if(${BUILD_SHARED_LIBS})
|
if(${BUILD_SHARED_LIBS})
|
||||||
|
@ -11,12 +11,14 @@ string(REGEX MATCH "Major = ([0-9]+)" _ ${version})
|
|||||||
# This works do to the above () subexpression selection. See
|
# This works do to the above () subexpression selection. See
|
||||||
# https://cmake.org/cmake/help/latest/command/string.html#regex-match for more
|
# https://cmake.org/cmake/help/latest/command/string.html#regex-match for more
|
||||||
# details
|
# details
|
||||||
set(major ${CMAKE_MATCH_1})
|
set(TRACY_VERSION_MAJOR ${CMAKE_MATCH_1})
|
||||||
|
|
||||||
string(REGEX MATCH "Minor = ([0-9]+)" _ ${version})
|
string(REGEX MATCH "Minor = ([0-9]+)" _ ${version})
|
||||||
set(minor ${CMAKE_MATCH_1})
|
set(TRACY_VERSION_MINOR ${CMAKE_MATCH_1})
|
||||||
|
|
||||||
string(REGEX MATCH "Patch = ([0-9]+)" _ ${version})
|
string(REGEX MATCH "Patch = ([0-9]+)" _ ${version})
|
||||||
set(patch ${CMAKE_MATCH_1})
|
set(TRACY_VERSION_PATCH ${CMAKE_MATCH_1})
|
||||||
|
|
||||||
message("VERSION ${major}.${minor}.${patch}")
|
set(TRACY_VERSION_STRING "${TRACY_VERSION_MAJOR}.${TRACY_VERSION_MINOR}.${TRACY_VERSION_PATCH}")
|
||||||
|
|
||||||
|
message("VERSION ${TRACY_VERSION_STRING}")
|
||||||
|
@ -8,11 +8,6 @@ option(NO_STATISTICS "Disable calculation of statistics" OFF)
|
|||||||
|
|
||||||
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/version.cmake)
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/version.cmake)
|
||||||
|
|
||||||
set(TRACY_VERSION_MAJOR ${major})
|
|
||||||
set(TRACY_VERSION_MINOR ${minor})
|
|
||||||
set(TRACY_VERSION_PATCH ${patch})
|
|
||||||
set(TRACY_VERSION_STRING "${TRACY_VERSION_MAJOR}.${TRACY_VERSION_MINOR}.${TRACY_VERSION_PATCH}")
|
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 20)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
|
|
||||||
project(
|
project(
|
||||||
|
Loading…
Reference in New Issue
Block a user