1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00
tracy/cmake/version.cmake
Tom Atkinson 28bd9d1e2f Basic CMake
Temp: Remove CI

linux dependencies

auto download dependencies

install libs with choco

name artifacts

use LINK_LIBRARIES

add concurrency

install dependencies

install dependencies

install dependencies

passwordless sudo

windows fix

more windows fixes

more windows fixes

no statistics
2024-03-10 23:23:01 +00:00

25 lines
743 B
CMake

cmake_minimum_required(VERSION 3.10)
set(ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/..)
message("Parsing public/common/TracyVersion.hpp file")
file(READ "${ROOT_DIR}/public/common/TracyVersion.hpp" version)
# Note: This looks for a specific pattern in TracyVersion.hpp, if it changes
# this needs updating.
string(REGEX MATCH "Major = ([0-9]+)" _ ${version})
# This works do to the above () subexpression selection. See
# https://cmake.org/cmake/help/latest/command/string.html#regex-match for more
# details
set(major ${CMAKE_MATCH_1})
string(REGEX MATCH "Minor = ([0-9]+)" _ ${version})
set(minor ${CMAKE_MATCH_1})
string(REGEX MATCH "Patch = ([0-9]+)" _ ${version})
set(patch ${CMAKE_MATCH_1})
message("VERSION ${major}.${minor}.${patch}")