mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
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
This commit is contained in:
parent
082c13ac8e
commit
28bd9d1e2f
28
.github/workflows/latex.yml
vendored
28
.github/workflows/latex.yml
vendored
@ -1,28 +0,0 @@
|
|||||||
name: Manual
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Fix stupidity
|
|
||||||
run: |
|
|
||||||
cp AUTHORS AUTHORS.
|
|
||||||
cp LICENSE LICENSE.
|
|
||||||
- name: Compile LaTeX
|
|
||||||
uses: xu-cheng/latex-action@v3
|
|
||||||
with:
|
|
||||||
working_directory: manual
|
|
||||||
root_file: tracy.tex
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: manual
|
|
||||||
path: manual/tracy.pdf
|
|
||||||
140
.github/workflows/linux.yml
vendored
140
.github/workflows/linux.yml
vendored
@ -2,40 +2,116 @@ name: linux
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [master]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [master]
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
strategy:
|
||||||
runs-on: ubuntu-22.04
|
matrix:
|
||||||
container: archlinux:base-devel
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
continue-on-error: true # Allow other platforms to build even if one fails
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout
|
||||||
- name: Install linux libraries
|
uses: actions/checkout@v2
|
||||||
run: pacman -Syu --noconfirm && pacman -S --noconfirm --needed freetype2 capstone tbb debuginfod wayland dbus libxkbcommon libglvnd meson
|
|
||||||
- name: Profiler GUI
|
- name: Install Linux Dependencies
|
||||||
run: make -j`nproc` -C profiler/build/unix debug release
|
if: startsWith(matrix.os, 'ubuntu')
|
||||||
- name: Update utility
|
run: sudo apt-get install -y libcapstone-dev libtbb-dev libglfw3-dev libgtk-3-dev
|
||||||
run: make -j`nproc` -C update/build/unix debug release
|
|
||||||
- name: Capture utility
|
- name: Windows MSVC
|
||||||
run: make -j`nproc` -C capture/build/unix debug release
|
if: startsWith(matrix.os, 'windows')
|
||||||
- name: Csvexport utility
|
uses: microsoft/setup-msbuild@v2
|
||||||
run: make -j`nproc` -C csvexport/build/unix debug release
|
|
||||||
- name: Import-chrome utility
|
- name: Install Windows Dependencies
|
||||||
run: make -j`nproc` -C import-chrome/build/unix debug release
|
if: startsWith(matrix.os, 'windows')
|
||||||
- name: Import-fuchsia utility
|
run: vcpkg integrate install
|
||||||
run: make -j`nproc` -C import-fuchsia/build/unix debug release
|
|
||||||
- name: Library
|
- name: Install MacOS Dependencies
|
||||||
run: make -j`nproc` -C library/unix debug release
|
if: startsWith(matrix.os, 'macos')
|
||||||
- name: Library (meson)
|
run: brew install capstone tbb pkg-config glfw meson dbus
|
||||||
run: meson setup -Dprefix=$PWD/install build && meson compile -C build && meson install -C build
|
|
||||||
- name: Test application
|
- name: Build Profiler
|
||||||
run: |
|
run: |
|
||||||
make -j`nproc` -C test
|
cmake -B build/profiler -S profiler -DLEGACY=ON
|
||||||
make -j`nproc` -C test clean
|
cmake --build build/profiler --config Release --parallel
|
||||||
make -j`nproc` -C test TRACYFLAGS=-DTRACY_ON_DEMAND
|
|
||||||
make -j`nproc` -C test clean
|
- name: Build Update
|
||||||
make -j`nproc` -C test TRACYFLAGS="-DTRACY_DELAYED_INIT -DTRACY_MANUAL_LIFETIME"
|
run: |
|
||||||
make -C test -B ../public/TracyClient.o DEFINES='-DTRACY_DEMANGLE'
|
cmake -B build/update -S update
|
||||||
|
cmake --build build/update --config Release --parallel
|
||||||
|
|
||||||
|
- name: Build Capture
|
||||||
|
run: |
|
||||||
|
cmake -B build/capture -S capture
|
||||||
|
cmake --build build/capture --config Release --parallel
|
||||||
|
|
||||||
|
- name: Build Csv Export
|
||||||
|
run: |
|
||||||
|
cmake -B build/csvexport -S csvexport
|
||||||
|
cmake --build build/csvexport --config Release --parallel
|
||||||
|
|
||||||
|
- name: Build Import Chrome
|
||||||
|
run: |
|
||||||
|
cmake -B build/import-chrome -S import-chrome
|
||||||
|
cmake --build build/import-chrome --config Release --parallel
|
||||||
|
|
||||||
|
- name: Build Import Fuchsia
|
||||||
|
run: |
|
||||||
|
cmake -B build/import-fuchsia -S import-fuchsia
|
||||||
|
cmake --build build/import-fuchsia --config Release --parallel
|
||||||
|
|
||||||
|
- name: Find Artifacts
|
||||||
|
if: ${{ !startsWith(matrix.os, 'windows') }}
|
||||||
|
id: find_artifacts
|
||||||
|
run: |
|
||||||
|
echo PROFILER_PATH=build/profiler/Tracy >> $GITHUB_OUTPUT
|
||||||
|
echo UPDATE_PATH=build/update/update >> $GITHUB_OUTPUT
|
||||||
|
echo CAPTURE_PATH=build/capture/capture >> $GITHUB_OUTPUT
|
||||||
|
echo CSVEXPORT_PATH=build/csvexport/csvexport >> $GITHUB_OUTPUT
|
||||||
|
echo IMPORT_CHROME_PATH=build/import-chrome/import-chrome >> $GITHUB_OUTPUT
|
||||||
|
echo IMPORT_FUCHSIA_PATH=build/import-fuchsia/import-fuchsia >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Find Artifacts Windows
|
||||||
|
if: startsWith(matrix.os, 'windows')
|
||||||
|
id: find_artifacts_windows
|
||||||
|
run: |
|
||||||
|
echo PROFILER_PATH=build/profiler/Release/Tracy.exe >> $GITHUB_OUTPUT
|
||||||
|
echo UPDATE_PATH=build/update/Release/update.exe >> $GITHUB_OUTPUT
|
||||||
|
echo CAPTURE_PATH=build/capture/Release/capture.exe >> $GITHUB_OUTPUT
|
||||||
|
echo CSVEXPORT_PATH=build/csvexport/Release/csvexport.exe >> $GITHUB_OUTPUT
|
||||||
|
echo IMPORT_CHROME_PATH=build/import-chrome/Release/import-chrome.exe >> $GITHUB_OUTPUT
|
||||||
|
echo IMPORT_FUCHSIA_PATH=build/import-fuchsia/Release/import-fuchsia.exe >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Export Artifacts
|
||||||
|
if: ${{ !startsWith(matrix.os, 'windows') }}
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.os }}
|
||||||
|
path: |
|
||||||
|
${{ steps.find_artifacts.outputs.PROFILER_PATH }}
|
||||||
|
${{ steps.find_artifacts.outputs.UPDATE_PATH }}
|
||||||
|
${{ steps.find_artifacts.outputs.CAPTURE_PATH }}
|
||||||
|
${{ steps.find_artifacts.outputs.CSVEXPORT_PATH }}
|
||||||
|
${{ steps.find_artifacts.outputs.IMPORT_CHROME_PATH }}
|
||||||
|
${{ steps.find_artifacts.outputs.IMPORT_FUCHSIA_PATH }}
|
||||||
|
|
||||||
|
- name: Export Artifacts Windows
|
||||||
|
if: startsWith(matrix.os, 'windows')
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.os }}
|
||||||
|
path: |
|
||||||
|
${{ steps.find_artifacts_windows.outputs.PROFILER_PATH }}
|
||||||
|
${{ steps.find_artifacts_windows.outputs.UPDATE_PATH }}
|
||||||
|
${{ steps.find_artifacts_windows.outputs.CAPTURE_PATH }}
|
||||||
|
${{ steps.find_artifacts_windows.outputs.CSVEXPORT_PATH }}
|
||||||
|
${{ steps.find_artifacts_windows.outputs.IMPORT_CHROME_PATH }}
|
||||||
|
${{ steps.find_artifacts_windows.outputs.IMPORT_FUCHSIA_PATH }}
|
||||||
|
|
||||||
|
|||||||
40
.github/workflows/macos.yml
vendored
40
.github/workflows/macos.yml
vendored
@ -1,40 +0,0 @@
|
|||||||
name: macos
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: macOS-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Install macos libraries
|
|
||||||
run: brew install capstone tbb pkg-config glfw meson
|
|
||||||
- name: Profiler GUI
|
|
||||||
run: make -j`nproc` -C profiler/build/unix debug release
|
|
||||||
- name: Update utility
|
|
||||||
run: make -j`nproc` -C update/build/unix debug release
|
|
||||||
- name: Capture utility
|
|
||||||
run: make -j`nproc` -C capture/build/unix debug release
|
|
||||||
- name: Csvexport utility
|
|
||||||
run: make -j`nproc` -C csvexport/build/unix debug release
|
|
||||||
- name: Import-chrome utility
|
|
||||||
run: make -j`nproc` -C import-chrome/build/unix debug release
|
|
||||||
- name: Import-fuchsia utility
|
|
||||||
run: make -j`nproc` -C import-fuchsia/build/unix debug release
|
|
||||||
- name: Library
|
|
||||||
run: make -j`nproc` -C library/unix debug release
|
|
||||||
- name: Library (meson)
|
|
||||||
run: meson setup -Dprefix=$PWD/install build && meson compile -C build && meson install -C build
|
|
||||||
- name: Test application
|
|
||||||
run: |
|
|
||||||
make -j`nproc` -C test
|
|
||||||
make -j`nproc` -C test clean
|
|
||||||
make -j`nproc` -C test TRACYFLAGS=-DTRACY_ON_DEMAND
|
|
||||||
make -j`nproc` -C test clean
|
|
||||||
make -j`nproc` -C test TRACYFLAGS="-DTRACY_DELAYED_INIT -DTRACY_MANUAL_LIFETIME"
|
|
||||||
make -C test -B ../public/TracyClient.o DEFINES='-DTRACY_DEMANGLE'
|
|
||||||
76
.github/workflows/msvc.yml
vendored
76
.github/workflows/msvc.yml
vendored
@ -1,76 +0,0 @@
|
|||||||
name: MSVC
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-with-vcpkg-integration:
|
|
||||||
|
|
||||||
runs-on: windows-2022
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: microsoft/setup-msbuild@v2
|
|
||||||
- name: Integrate vcpkg
|
|
||||||
run: vcpkg integrate install
|
|
||||||
- name: Profiler GUI Debug
|
|
||||||
run: msbuild .\profiler\build\win32\Tracy.vcxproj /property:Configuration=Debug /property:Platform=x64
|
|
||||||
- name: Profiler GUI Release
|
|
||||||
run: msbuild .\profiler\build\win32\Tracy.vcxproj /property:Configuration=Release /property:Platform=x64
|
|
||||||
- name: Update utility Debug
|
|
||||||
run: msbuild .\update\build\win32\update.vcxproj /property:Configuration=Debug /property:Platform=x64
|
|
||||||
- name: Update utility Release
|
|
||||||
run: msbuild .\update\build\win32\update.vcxproj /property:Configuration=Release /property:Platform=x64
|
|
||||||
- name: Capture utility Debug
|
|
||||||
run: msbuild .\capture\build\win32\capture.vcxproj /property:Configuration=Debug /property:Platform=x64
|
|
||||||
- name: Capture utility Release
|
|
||||||
run: msbuild .\capture\build\win32\capture.vcxproj /property:Configuration=Release /property:Platform=x64
|
|
||||||
- name: Csvexport utility Debug
|
|
||||||
run: msbuild .\csvexport\build\win32\csvexport.vcxproj /property:Configuration=Debug /property:Platform=x64
|
|
||||||
- name: Csvexport utility Release
|
|
||||||
run: msbuild .\csvexport\build\win32\csvexport.vcxproj /property:Configuration=Release /property:Platform=x64
|
|
||||||
- name: Import-chrome utility Debug
|
|
||||||
run: msbuild .\import-chrome\build\win32\import-chrome.vcxproj /property:Configuration=Debug /property:Platform=x64
|
|
||||||
- name: Import-chrome utility Release
|
|
||||||
run: msbuild .\import-chrome\build\win32\import-chrome.vcxproj /property:Configuration=Release /property:Platform=x64
|
|
||||||
- name: Import-fuchsia utility Debug
|
|
||||||
run: msbuild .\import-fuchsia\build\win32\import-fuchsia.vcxproj /property:Configuration=Debug /property:Platform=x64
|
|
||||||
- name: Import-fuchsia utility Release
|
|
||||||
run: msbuild .\import-fuchsia\build\win32\import-fuchsia.vcxproj /property:Configuration=Release /property:Platform=x64
|
|
||||||
- name: Library
|
|
||||||
run: msbuild .\library\win32\TracyProfiler.vcxproj /property:Configuration=Release /property:Platform=x64
|
|
||||||
- name: Package binaries
|
|
||||||
run: |
|
|
||||||
mkdir bin
|
|
||||||
mkdir bin\dev
|
|
||||||
copy profiler\build\win32\x64\Release\Tracy.exe bin
|
|
||||||
copy update\build\win32\x64\Release\update.exe bin
|
|
||||||
copy capture\build\win32\x64\Release\capture.exe bin
|
|
||||||
copy import-chrome\build\win32\x64\Release\import-chrome.exe bin
|
|
||||||
copy csvexport\build\win32\x64\Release\csvexport.exe bin
|
|
||||||
copy library\win32\x64\Release\TracyProfiler.dll bin\dev
|
|
||||||
copy library\win32\x64\Release\TracyProfiler.lib bin\dev
|
|
||||||
7z a Tracy.7z bin
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
path: Tracy.7z
|
|
||||||
|
|
||||||
build-without-vcpkg-integration:
|
|
||||||
|
|
||||||
runs-on: windows-2022
|
|
||||||
|
|
||||||
env:
|
|
||||||
VCPKG_ROOT: ''
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: microsoft/setup-msbuild@v2
|
|
||||||
- name: Install vcpkg dependencies
|
|
||||||
run: vcpkg/install_vcpkg_dependencies.bat
|
|
||||||
- name: Profiler GUI Release
|
|
||||||
run: msbuild .\profiler\build\win32\Tracy.vcxproj /property:Configuration=Release /property:Platform=x64
|
|
||||||
- name: Capture utility Release
|
|
||||||
run: msbuild .\capture\build\win32\capture.vcxproj /property:Configuration=Release /property:Platform=x64
|
|
||||||
4
.gitignore
vendored
4
.gitignore
vendored
@ -44,3 +44,7 @@ compile_commands.json
|
|||||||
profiler/build/wasm/Tracy-release.*
|
profiler/build/wasm/Tracy-release.*
|
||||||
profiler/build/wasm/Tracy-debug.*
|
profiler/build/wasm/Tracy-debug.*
|
||||||
profiler/build/wasm/embed.tracy
|
profiler/build/wasm/embed.tracy
|
||||||
|
|
||||||
|
|
||||||
|
# Only ignore top-level build directory
|
||||||
|
/build
|
||||||
@ -1,7 +1,7 @@
|
|||||||
cmake_minimum_required(VERSION 3.10)
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
|
||||||
# Run version helper script
|
# Run version helper script
|
||||||
include(version.cmake)
|
include(${CMAKE_CURRENT_LIST_DIR}/cmake/version.cmake)
|
||||||
|
|
||||||
set(TRACY_VERSION_MAJOR ${major})
|
set(TRACY_VERSION_MAJOR ${major})
|
||||||
set(TRACY_VERSION_MINOR ${minor})
|
set(TRACY_VERSION_MINOR ${minor})
|
||||||
@ -20,7 +20,7 @@ option(TRACY_STATIC "Whether to build Tracy as a static library" ${DEFAULT_STATI
|
|||||||
|
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
|
|
||||||
set(TRACY_PUBLIC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/public)
|
set(TRACY_PUBLIC_DIR ${CMAKE_CURRENT_LIST_DIR}/public)
|
||||||
|
|
||||||
if(TRACY_STATIC)
|
if(TRACY_STATIC)
|
||||||
set(TRACY_VISIBILITY "STATIC")
|
set(TRACY_VISIBILITY "STATIC")
|
||||||
@ -52,16 +52,22 @@ endif()
|
|||||||
|
|
||||||
add_library(Tracy::TracyClient ALIAS TracyClient)
|
add_library(Tracy::TracyClient ALIAS TracyClient)
|
||||||
|
|
||||||
macro(set_option option help value)
|
macro(log_option option help value)
|
||||||
option(${option} ${help} ${value})
|
|
||||||
if(${option})
|
if(${option})
|
||||||
message(STATUS "${option}: ON")
|
message(STATUS "${option}: ON")
|
||||||
target_compile_definitions(TracyClient PUBLIC ${option})
|
|
||||||
else()
|
else()
|
||||||
message(STATUS "${option}: OFF")
|
message(STATUS "${option}: OFF")
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
macro(set_option option help value)
|
||||||
|
option(${option} ${help} ${value})
|
||||||
|
if(${option})
|
||||||
|
target_compile_definitions(TracyClient PUBLIC ${option})
|
||||||
|
endif()
|
||||||
|
log_option(${option} ${help} ${value})
|
||||||
|
endmacro()
|
||||||
|
|
||||||
set_option(TRACY_ENABLE "Enable profiling" ON)
|
set_option(TRACY_ENABLE "Enable profiling" ON)
|
||||||
set_option(TRACY_ON_DEMAND "On-demand profiling" OFF)
|
set_option(TRACY_ON_DEMAND "On-demand profiling" OFF)
|
||||||
set_option(TRACY_CALLSTACK "Enforce callstack collection for tracy regions" OFF)
|
set_option(TRACY_CALLSTACK "Enforce callstack collection for tracy regions" OFF)
|
||||||
@ -162,7 +168,7 @@ install(EXPORT TracyConfig
|
|||||||
FILE TracyTargets.cmake
|
FILE TracyTargets.cmake
|
||||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Tracy)
|
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Tracy)
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
|
configure_package_config_file(${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/TracyConfig.cmake"
|
"${CMAKE_CURRENT_BINARY_DIR}/TracyConfig.cmake"
|
||||||
INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Tracy)
|
INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Tracy)
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/TracyConfig.cmake
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/TracyConfig.cmake
|
||||||
|
|||||||
48
README.md
48
README.md
@ -26,3 +26,51 @@ Tracy supports profiling CPU (Direct support is provided for C, C++, and Lua int
|
|||||||
[New features in Tracy Profiler v0.6](https://www.youtube.com/watch?v=uJkrFgriuOo)
|
[New features in Tracy Profiler v0.6](https://www.youtube.com/watch?v=uJkrFgriuOo)
|
||||||
[New features in Tracy Profiler v0.7](https://www.youtube.com/watch?v=_hU7vw00MZ4)
|
[New features in Tracy Profiler v0.7](https://www.youtube.com/watch?v=_hU7vw00MZ4)
|
||||||
[New features in Tracy Profiler v0.8](https://www.youtube.com/watch?v=30wpRpHTTag)
|
[New features in Tracy Profiler v0.8](https://www.youtube.com/watch?v=30wpRpHTTag)
|
||||||
|
|
||||||
|
# Building the executables
|
||||||
|
|
||||||
|
For an indepth build guide please refer to the [documentation](https://github.com/wolfpld/tracy/releases/latest/download/tracy.pdf)
|
||||||
|
|
||||||
|
For a quick build guide with CMake:
|
||||||
|
|
||||||
|
### Profiler
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cmake -B build/profiler -S profiler
|
||||||
|
cmake --build build/profiler
|
||||||
|
```
|
||||||
|
|
||||||
|
### Update
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cmake -B build/update -S update
|
||||||
|
cmake --build build/update
|
||||||
|
```
|
||||||
|
|
||||||
|
### Capture
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cmake -B build/capture -S capture
|
||||||
|
cmake --build build/capture
|
||||||
|
```
|
||||||
|
|
||||||
|
### Csv Export
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cmake -B build/csvexport -S csvexport
|
||||||
|
cmake --build build/csvexport
|
||||||
|
```
|
||||||
|
|
||||||
|
### Import Chrome
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cmake -B build/import-chrome -S import-chrome
|
||||||
|
cmake --build build/import-chrome
|
||||||
|
```
|
||||||
|
|
||||||
|
## Import Fuchsia
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cmake -B build/import-fuchsia -S import-fuchsia
|
||||||
|
cmake --build build/import-fuchsia
|
||||||
|
```
|
||||||
15
capture/CMakeLists.txt
Normal file
15
capture/CMakeLists.txt
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.19)
|
||||||
|
project(capture C CXX ASM)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/vendor.cmake)
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/server.cmake)
|
||||||
|
|
||||||
|
set(CAPTURE_SOURCE
|
||||||
|
src/capture.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(capture ${CAPTURE_SOURCE})
|
||||||
|
target_include_directories(capture PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||||
|
target_link_libraries(capture PRIVATE TracyServer)
|
||||||
1161
cmake/CPM.cmake
Normal file
1161
cmake/CPM.cmake
Normal file
File diff suppressed because it is too large
Load Diff
104
cmake/server.cmake
Normal file
104
cmake/server.cmake
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
|
||||||
|
set(TRACY_CLIENT_SOURCES
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/../public/TracyClient.cpp
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/../public/common/TracyStackFrames.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(TracyClient STATIC ${TRACY_CLIENT_SOURCES})
|
||||||
|
target_include_directories(TracyClient PUBLIC ${CMAKE_CURRENT_LIST_DIR}/../public)
|
||||||
|
target_compile_definitions(TracyClient PUBLIC TRACY_ENABLE)
|
||||||
|
if (TRACY_NO_STATISTICS)
|
||||||
|
target_compile_definitions(TracyClient PUBLIC TRACY_NO_STATISTICS)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(SERVER_SOURCES
|
||||||
|
TracyEventDebug.cpp
|
||||||
|
TracyTimelineController.cpp
|
||||||
|
TracyView_Playback.cpp
|
||||||
|
TracyTexture.cpp
|
||||||
|
TracyView_Locks.cpp
|
||||||
|
TracyView_Memory.cpp
|
||||||
|
TracyFileselector.cpp
|
||||||
|
TracyView_Compare.cpp
|
||||||
|
TracyView_ZoneInfo.cpp
|
||||||
|
TracyView_Callstack.cpp
|
||||||
|
TracySourceContents.cpp
|
||||||
|
TracyPrint.cpp
|
||||||
|
TracyStorage.cpp
|
||||||
|
TracyTextureCompression.cpp
|
||||||
|
TracySourceView.cpp
|
||||||
|
TracyView_ContextSwitch.cpp
|
||||||
|
TracyUserData.cpp
|
||||||
|
TracySourceTokenizer.cpp
|
||||||
|
TracyView_Statistics.cpp
|
||||||
|
TracyView_Timeline.cpp
|
||||||
|
TracyUtility.cpp
|
||||||
|
TracyTimelineItemCpuData.cpp
|
||||||
|
TracyView_FrameTree.cpp
|
||||||
|
TracyMicroArchitecture.cpp
|
||||||
|
TracyView_Ranges.cpp
|
||||||
|
TracyView.cpp
|
||||||
|
TracyMemory.cpp
|
||||||
|
TracyView_ConnectionState.cpp
|
||||||
|
TracyView_Navigation.cpp
|
||||||
|
TracyView_Utility.cpp
|
||||||
|
TracyView_Plots.cpp
|
||||||
|
TracyProtoHistory.cpp
|
||||||
|
TracyView_FrameTimeline.cpp
|
||||||
|
TracyView_FindZone.cpp
|
||||||
|
TracyThreadCompress.cpp
|
||||||
|
TracyImGui.cpp
|
||||||
|
TracyView_GpuTimeline.cpp
|
||||||
|
TracyTaskDispatch.cpp
|
||||||
|
TracyTimelineItemThread.cpp
|
||||||
|
TracyTimelineItemPlot.cpp
|
||||||
|
TracyWeb.cpp
|
||||||
|
TracyTimelineItem.cpp
|
||||||
|
TracyColor.cpp
|
||||||
|
TracyWorker.cpp
|
||||||
|
TracyView_FrameOverview.cpp
|
||||||
|
TracyView_Samples.cpp
|
||||||
|
TracyMouse.cpp
|
||||||
|
TracyView_Messages.cpp
|
||||||
|
TracyMmap.cpp
|
||||||
|
TracyView_ZoneTimeline.cpp
|
||||||
|
TracyView_Annotations.cpp
|
||||||
|
TracyFilesystem.cpp
|
||||||
|
TracyView_TraceInfo.cpp
|
||||||
|
TracyView_NotificationArea.cpp
|
||||||
|
TracyTimelineItemGpu.cpp
|
||||||
|
TracyView_CpuData.cpp
|
||||||
|
TracyBadVersion.cpp
|
||||||
|
TracyView_Options.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
list(TRANSFORM SERVER_SOURCES PREPEND ${CMAKE_CURRENT_SOURCE_DIR}/../server/)
|
||||||
|
|
||||||
|
add_library(TracyServer STATIC ${SERVER_SOURCES})
|
||||||
|
target_include_directories(TracyServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../server)
|
||||||
|
target_link_libraries(TracyServer PUBLIC TracyImGui TracyCapstone TracyZstd TracyClient)
|
||||||
|
|
||||||
|
target_compile_definitions(TracyServer PUBLIC NOMINMAX) # Windows.h defines min and max macros which conflict with std::min and std::max
|
||||||
|
|
||||||
|
if (NOT NO_TBB)
|
||||||
|
target_link_libraries(TracyServer PUBLIC TracyTbb)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (TRACY_NO_STATISTICS)
|
||||||
|
message(STATUS "Disabling server statistics")
|
||||||
|
target_compile_definitions(TracyServer PUBLIC TRACY_NO_STATISTICS)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
|
if (CMAKE_LINKER MATCHES "ld.mold")
|
||||||
|
set(LDFLAGS "-fuse-ld=mold")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT TRACY_NO_ISA_EXTENSIONS)
|
||||||
|
if (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "arm64")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=native")
|
||||||
|
elseif(UNIX)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
227
cmake/vendor.cmake
Normal file
227
cmake/vendor.cmake
Normal file
@ -0,0 +1,227 @@
|
|||||||
|
# Vendor Specific CMake
|
||||||
|
# The Tracy project keeps most vendor source locally
|
||||||
|
|
||||||
|
set (ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}/../")
|
||||||
|
|
||||||
|
# Dependencies are taken from the system first and if not found, they are pulled with CPM and built from source
|
||||||
|
|
||||||
|
include(FindPkgConfig)
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/CPM.cmake)
|
||||||
|
|
||||||
|
option(TRACY_DOWNLOAD_CAPSTONE "Force download capstone" OFF)
|
||||||
|
option(TRACY_DOWNLOAD_GLFW "Force download glfw" OFF)
|
||||||
|
option(TRACY_DOWNLOAD_FREETYPE "Force download freetype" OFF)
|
||||||
|
|
||||||
|
# capstone
|
||||||
|
|
||||||
|
# pkg_check_modules(CAPSTONE capstone)
|
||||||
|
if(CAPSTONE_FOUND AND NOT TRACY_DOWNLOAD_CAPSTONE)
|
||||||
|
message(STATUS "Capstone found: ${CAPSTONE}")
|
||||||
|
add_library(TracyCapstone INTERFACE)
|
||||||
|
target_include_directories(TracyCapstone INTERFACE ${CAPSTONE_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(TracyCapstone INTERFACE ${CAPSTONE_LINK_LIBRARIES})
|
||||||
|
else()
|
||||||
|
CPMAddPackage(
|
||||||
|
NAME capstone
|
||||||
|
GITHUB_REPOSITORY capstone-engine/capstone
|
||||||
|
GIT_TAG 5.0.1
|
||||||
|
)
|
||||||
|
add_library(TracyCapstone INTERFACE)
|
||||||
|
target_link_libraries(TracyCapstone INTERFACE capstone)
|
||||||
|
|
||||||
|
target_include_directories(TracyCapstone INTERFACE ${capstone_SOURCE_DIR}/include/capstone)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# GLFW
|
||||||
|
|
||||||
|
if (NOT UNIX)
|
||||||
|
set(LEGACY ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (LEGACY)
|
||||||
|
pkg_check_modules(GLFW glfw3)
|
||||||
|
if (GLFW_FOUND AND NOT TRACY_DOWNLOAD_GLFW)
|
||||||
|
add_library(TracyGlfw3 INTERFACE)
|
||||||
|
target_include_directories(TracyGlfw3 INTERFACE ${GLFW_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(TracyGlfw3 INTERFACE ${GLFW_LINK_LIBRARIES})
|
||||||
|
else()
|
||||||
|
CPMAddPackage(
|
||||||
|
NAME glfw
|
||||||
|
GITHUB_REPOSITORY glfw/glfw
|
||||||
|
GIT_TAG 3.3.9
|
||||||
|
)
|
||||||
|
add_library(TracyGlfw3 INTERFACE)
|
||||||
|
target_link_libraries(TracyGlfw3 INTERFACE glfw)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# freetype
|
||||||
|
|
||||||
|
pkg_check_modules(FREETYPE freetype2)
|
||||||
|
if (FREETYPE_FOUND AND NOT TRACY_DOWNLOAD_FREETYPE)
|
||||||
|
add_library(TracyFreetype INTERFACE)
|
||||||
|
target_include_directories(TracyFreetype INTERFACE ${FREETYPE_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(TracyFreetype INTERFACE ${FREETYPE_LINK_LIBRARIES})
|
||||||
|
else()
|
||||||
|
CPMAddPackage(
|
||||||
|
NAME freetype
|
||||||
|
GITHUB_REPOSITORY freetype/freetype
|
||||||
|
GIT_TAG VER-2-13-2
|
||||||
|
)
|
||||||
|
add_library(TracyFreetype INTERFACE)
|
||||||
|
target_link_libraries(TracyFreetype INTERFACE freetype)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# zstd
|
||||||
|
|
||||||
|
set(ZSTD_DIR "${ROOT_DIR}/zstd")
|
||||||
|
|
||||||
|
set(ZSTD_SOURCES
|
||||||
|
decompress/zstd_ddict.c
|
||||||
|
decompress/zstd_decompress_block.c
|
||||||
|
decompress/huf_decompress.c
|
||||||
|
decompress/zstd_decompress.c
|
||||||
|
common/zstd_common.c
|
||||||
|
common/error_private.c
|
||||||
|
common/xxhash.c
|
||||||
|
common/entropy_common.c
|
||||||
|
common/debug.c
|
||||||
|
common/threading.c
|
||||||
|
common/pool.c
|
||||||
|
common/fse_decompress.c
|
||||||
|
compress/zstd_ldm.c
|
||||||
|
compress/zstd_compress_superblock.c
|
||||||
|
compress/zstd_opt.c
|
||||||
|
compress/zstd_compress_sequences.c
|
||||||
|
compress/fse_compress.c
|
||||||
|
compress/zstd_double_fast.c
|
||||||
|
compress/zstd_compress.c
|
||||||
|
compress/zstd_compress_literals.c
|
||||||
|
compress/hist.c
|
||||||
|
compress/zstdmt_compress.c
|
||||||
|
compress/zstd_lazy.c
|
||||||
|
compress/huf_compress.c
|
||||||
|
compress/zstd_fast.c
|
||||||
|
dictBuilder/zdict.c
|
||||||
|
dictBuilder/cover.c
|
||||||
|
dictBuilder/divsufsort.c
|
||||||
|
dictBuilder/fastcover.c
|
||||||
|
|
||||||
|
# Assembly
|
||||||
|
decompress/huf_decompress_amd64.S
|
||||||
|
)
|
||||||
|
|
||||||
|
list(TRANSFORM ZSTD_SOURCES PREPEND "${ZSTD_DIR}/")
|
||||||
|
|
||||||
|
set_property(SOURCE ${ZSTD_DIR}/decompress/huf_decompress_amd64.S APPEND PROPERTY COMPILE_OPTIONS "-x" "assembler-with-cpp")
|
||||||
|
|
||||||
|
add_library(TracyZstd STATIC ${ZSTD_SOURCES})
|
||||||
|
target_include_directories(TracyZstd PUBLIC ${ZSTD_DIR})
|
||||||
|
|
||||||
|
|
||||||
|
# Diff Template Library
|
||||||
|
|
||||||
|
set(DTL_DIR "${ROOT_DIR}/dtl")
|
||||||
|
file(GLOB_RECURSE DTL_HEADERS CONFIGURE_DEPENDS RELATIVE ${DTL_DIR} "*.hpp")
|
||||||
|
add_library(TracyDtl INTERFACE)
|
||||||
|
target_sources(TracyDtl INTERFACE ${DTL_HEADERS})
|
||||||
|
target_include_directories(TracyDtl INTERFACE ${DTL_DIR})
|
||||||
|
|
||||||
|
# Get Opt
|
||||||
|
|
||||||
|
set(GETOPT_DIR "${ROOT_DIR}/getopt")
|
||||||
|
set(GETOPT_SOURCES ${GETOPT_DIR}/getopt.c)
|
||||||
|
set(GETOPT_HEADERS ${GETOPT_DIR}/getopt.h)
|
||||||
|
add_library(TracyGetOpt STATIC ${GETOPT_SOURCES} ${GETOPT_HEADERS})
|
||||||
|
target_include_directories(TracyGetOpt PUBLIC ${GETOPT_DIR})
|
||||||
|
|
||||||
|
|
||||||
|
# ImGui
|
||||||
|
|
||||||
|
set(IMGUI_DIR "${ROOT_DIR}/imgui")
|
||||||
|
|
||||||
|
set(IMGUI_SOURCES
|
||||||
|
${IMGUI_DIR}/imgui_widgets.cpp
|
||||||
|
${IMGUI_DIR}/imgui_draw.cpp
|
||||||
|
${IMGUI_DIR}/imgui_demo.cpp
|
||||||
|
${IMGUI_DIR}/imgui.cpp
|
||||||
|
${IMGUI_DIR}/imgui_tables.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set(IMGUI_FREETYPE_SOURCES
|
||||||
|
${IMGUI_DIR}/misc/freetype/imgui_freetype.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(TracyImGui STATIC ${IMGUI_SOURCES} ${IMGUI_FREETYPE_SOURCES})
|
||||||
|
target_include_directories(TracyImGui PUBLIC ${IMGUI_DIR})
|
||||||
|
target_link_libraries(TracyImGui PUBLIC TracyFreetype)
|
||||||
|
|
||||||
|
if (LEGACY)
|
||||||
|
target_link_libraries(TracyImGui PUBLIC TracyGlfw3)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# NFD
|
||||||
|
|
||||||
|
if (NOT TRACY_NO_FILESELECTOR)
|
||||||
|
set(NFD_DIR "${ROOT_DIR}/nfd")
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
set(NFD_SOURCES "${NFD_DIR}/nfd_win.cpp")
|
||||||
|
elseif (APPLE)
|
||||||
|
set(NFD_SOURCES "${NFD_DIR}/nfd_cocoa.m")
|
||||||
|
else()
|
||||||
|
if (TRACY_GTK_FILESELECTOR)
|
||||||
|
set(NFD_SOURCES "${NFD_DIR}/nfd_gtk.cpp")
|
||||||
|
else()
|
||||||
|
set(NFD_SOURCES "${NFD_DIR}/nfd_portal.cpp")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
file(GLOB_RECURSE NFD_HEADERS CONFIGURE_DEPENDS RELATIVE ${NFD_DIR} "*.h")
|
||||||
|
add_library(TracyNfd STATIC ${NFD_SOURCES} ${NFD_HEADERS})
|
||||||
|
target_include_directories(TracyNfd PUBLIC ${NFD_DIR})
|
||||||
|
|
||||||
|
if (APPLE)
|
||||||
|
find_library(APPKIT_LIBRARY AppKit)
|
||||||
|
find_library(UNIFORMTYPEIDENTIFIERS_LIBRARY UniformTypeIdentifiers)
|
||||||
|
target_link_libraries(TracyNfd PUBLIC ${APPKIT_LIBRARY} ${UNIFORMTYPEIDENTIFIERS_LIBRARY})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
if (UNIX)
|
||||||
|
if (TRACY_GTK_FILESELECTOR)
|
||||||
|
pkg_check_modules(GTK3 gtk+-3.0)
|
||||||
|
if (NOT GTK3_FOUND)
|
||||||
|
message(FATAL_ERROR "GTK3 not found. Please install it or set TRACY_GTK_FILESELECTOR to OFF.")
|
||||||
|
endif()
|
||||||
|
add_library(TracyGtk3 INTERFACE)
|
||||||
|
target_include_directories(TracyGtk3 INTERFACE ${GTK3_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(TracyGtk3 INTERFACE ${GTK3_LINK_LIBRARIES})
|
||||||
|
target_link_libraries(TracyNfd PUBLIC TracyGtk3)
|
||||||
|
else()
|
||||||
|
pkg_check_modules(DBUS dbus-1)
|
||||||
|
if (NOT DBUS_FOUND)
|
||||||
|
message(FATAL_ERROR "D-Bus not found. Please install it or set TRACY_GTK_FILESELECTOR to ON.")
|
||||||
|
endif()
|
||||||
|
add_library(TracyDbus INTERFACE)
|
||||||
|
target_include_directories(TracyDbus INTERFACE ${DBUS_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(TracyDbus INTERFACE ${DBUS_LINK_LIBRARIES})
|
||||||
|
target_link_libraries(TracyNfd PUBLIC TracyDbus)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# TBB
|
||||||
|
|
||||||
|
if (NOT NO_TBB)
|
||||||
|
# Tracy does not use TBB directly, but the implementation of parallel algorithms
|
||||||
|
# in some versions of libstdc++ depends on TBB. When it does, you must
|
||||||
|
# explicitly link against -ltbb.
|
||||||
|
#
|
||||||
|
# Some distributions have pgk-config files for TBB, others don't.
|
||||||
|
|
||||||
|
pkg_check_modules(TBB tbb)
|
||||||
|
add_library(TracyTbb INTERFACE)
|
||||||
|
target_include_directories(TracyTbb INTERFACE ${TBB_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(TracyTbb INTERFACE ${TBB_LINK_LIBRARIES})
|
||||||
|
endif()
|
||||||
@ -1,8 +1,10 @@
|
|||||||
cmake_minimum_required(VERSION 3.10)
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
|
||||||
|
set(ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/..)
|
||||||
|
|
||||||
message("Parsing public/common/TracyVersion.hpp file")
|
message("Parsing public/common/TracyVersion.hpp file")
|
||||||
|
|
||||||
file(READ "public/common/TracyVersion.hpp" version)
|
file(READ "${ROOT_DIR}/public/common/TracyVersion.hpp" version)
|
||||||
|
|
||||||
# Note: This looks for a specific pattern in TracyVersion.hpp, if it changes
|
# Note: This looks for a specific pattern in TracyVersion.hpp, if it changes
|
||||||
# this needs updating.
|
# this needs updating.
|
||||||
15
csvexport/CMakeLists.txt
Normal file
15
csvexport/CMakeLists.txt
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.19)
|
||||||
|
project(csvexport C CXX ASM)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/vendor.cmake)
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/server.cmake)
|
||||||
|
|
||||||
|
set(CSVEXPORT_SRC
|
||||||
|
src/csvexport.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(csvexport ${CSVEXPORT_SRC})
|
||||||
|
target_include_directories(csvexport PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||||
|
target_link_libraries(csvexport PRIVATE TracyServer)
|
||||||
15
import-chrome/CMakeLists.txt
Normal file
15
import-chrome/CMakeLists.txt
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.19)
|
||||||
|
project(import-chrome C CXX ASM)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/vendor.cmake)
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/server.cmake)
|
||||||
|
|
||||||
|
set(SOURCES
|
||||||
|
src/import-chrome.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(import-chrome ${SOURCES})
|
||||||
|
target_include_directories(import-chrome PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||||
|
target_link_libraries(import-chrome PRIVATE TracyServer)
|
||||||
15
import-fuchsia/CMakeLists.txt
Normal file
15
import-fuchsia/CMakeLists.txt
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.19)
|
||||||
|
project(import-fuchsia C CXX ASM)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/vendor.cmake)
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/server.cmake)
|
||||||
|
|
||||||
|
set(SOURCES
|
||||||
|
src/import-fuchsia.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(import-fuchsia ${SOURCES})
|
||||||
|
target_include_directories(import-fuchsia PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||||
|
target_link_libraries(import-fuchsia PRIVATE TracyServer)
|
||||||
59
profiler/CMakeLists.txt
Normal file
59
profiler/CMakeLists.txt
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.19)
|
||||||
|
project(Profiler C CXX ASM)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/vendor.cmake)
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/server.cmake)
|
||||||
|
|
||||||
|
set(PROFILER_SOURCE
|
||||||
|
src/ImGuiContext.cpp
|
||||||
|
src/HttpRequest.cpp
|
||||||
|
src/RunQueue.cpp
|
||||||
|
src/main.cpp
|
||||||
|
src/winmainArchDiscovery.cpp
|
||||||
|
src/winmain.cpp
|
||||||
|
src/WindowPosition.cpp
|
||||||
|
src/imgui/imgui_impl_opengl3.cpp
|
||||||
|
src/ResolvService.cpp
|
||||||
|
src/Fonts.cpp
|
||||||
|
src/ConnectionHistory.cpp
|
||||||
|
src/IsElevated.cpp
|
||||||
|
src/Filters.cpp
|
||||||
|
src/ini.c
|
||||||
|
)
|
||||||
|
|
||||||
|
set(GLFW_SOURCE
|
||||||
|
src/BackendGlfw.cpp
|
||||||
|
src/imgui/imgui_impl_glfw.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set(WAYLAND_SOURCE
|
||||||
|
src/wayland/xdg-decoration.c
|
||||||
|
src/wayland/xdg-shell.c
|
||||||
|
src/wayland/xdg-activation.c
|
||||||
|
src/BackendWayland.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
if (NOT UNIX)
|
||||||
|
set(LEGACY ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (LEGACY)
|
||||||
|
message(STATUS "Using legacy backend")
|
||||||
|
list(APPEND PROFILER_SOURCE ${GLFW_SOURCE})
|
||||||
|
else()
|
||||||
|
message(STATUS "Using Wayland backend")
|
||||||
|
list(APPEND PROFILER_SOURCE ${WAYLAND_SOURCE})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
add_executable(Tracy ${PROFILER_SOURCE})
|
||||||
|
target_include_directories(Tracy PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||||
|
target_link_libraries(Tracy PRIVATE TracyImGui TracyServer)
|
||||||
|
|
||||||
|
if (TRACY_NO_FILESELECTOR)
|
||||||
|
target_compile_definitions(Tracy PRIVATE TRACY_NO_FILESELECTOR)
|
||||||
|
else()
|
||||||
|
target_link_libraries(Tracy PRIVATE TracyNfd)
|
||||||
|
endif()
|
||||||
@ -20,6 +20,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "common/tracy_lz4.cpp"
|
#include "common/tracy_lz4.cpp"
|
||||||
|
#include "common/tracy_lz4hc.cpp"
|
||||||
#include "client/TracyProfiler.cpp"
|
#include "client/TracyProfiler.cpp"
|
||||||
#include "client/TracyCallstack.cpp"
|
#include "client/TracyCallstack.cpp"
|
||||||
#include "client/TracySysPower.cpp"
|
#include "client/TracySysPower.cpp"
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include "../common/TracyAlloc.hpp"
|
#include "../common/TracyAlloc.hpp"
|
||||||
#include "../common/TracyForceInline.hpp"
|
#include "../common/TracyForceInline.hpp"
|
||||||
|
|||||||
@ -26,6 +26,11 @@
|
|||||||
#include "TracyWorker.hpp"
|
#include "TracyWorker.hpp"
|
||||||
#include "tracy_robin_hood.h"
|
#include "tracy_robin_hood.h"
|
||||||
|
|
||||||
|
// Windows defines small
|
||||||
|
#ifdef small
|
||||||
|
#undef small
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace tracy
|
namespace tracy
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
18
update/CMakeLists.txt
Normal file
18
update/CMakeLists.txt
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.19)
|
||||||
|
project(update C CXX ASM)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/vendor.cmake)
|
||||||
|
include(${CMAKE_CURRENT_LIST_DIR}/../cmake/server.cmake)
|
||||||
|
|
||||||
|
set(UPDATE_SOURCE
|
||||||
|
src/OfflineSymbolResolverDbgHelper.cpp
|
||||||
|
src/OfflineSymbolResolver.cpp
|
||||||
|
src/OfflineSymbolResolverAddr2Line.cpp
|
||||||
|
src/update.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(update ${UPDATE_SOURCE})
|
||||||
|
target_include_directories(update PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||||
|
target_link_libraries(update PRIVATE TracyServer)
|
||||||
Loading…
x
Reference in New Issue
Block a user