Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ endif()
# https://cmake.org/cmake/help/latest/prop_tgt/CXX_STANDARD.html
string(COMPARE EQUAL "${CMAKE_CXX_STANDARD}" "" no_cmake_cxx_standard_set)
if(no_cmake_cxx_standard_set)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
message(STATUS "Using default C++ standard ${CMAKE_CXX_STANDARD}")
Expand Down Expand Up @@ -105,9 +105,12 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error") # Don't treat warnings as
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsign-compare")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshadow")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wconversion")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnull-dereference")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-null-dereference")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-dangling-reference")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wdouble-promotion")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat=2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-system-headers") # Suppress warnings from external libraries
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-maybe-uninitialized") # Suppress uninitialized variable warnings from external date library

# Performance optimizations
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
Expand Down
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

**The Original Graphical Touchscreen Restaurant Point of Sale Interface**

[![Build Status](https://img.shields.io/travis/ViewTouch/viewtouch/master.svg?label=Travis)](https://travis-ci.org/ViewTouch/viewtouch/builds)
[![Discord](https://img.shields.io/discord/YOUR_SERVER_ID?color=7289da&label=Discord&logo=discord&logoColor=white)](https://discord.com/invite/ySmH2U2Mzb)
[![Linux builds (basic)](https://github.com/ViewTouch/viewtouch/actions/workflows/linux-simple-builds.yml/badge.svg)](https://github.com/ViewTouch/viewtouch/actions/workflows/linux-simple-builds.yml)
[![Join the chat at https://gitter.im/ViewTouch/viewtouch](https://badges.gitter.im/ViewTouch/viewtouch.svg)](https://gitter.im/ViewTouch/viewtouch?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![C++](https://img.shields.io/badge/C%2B%2B-23-blue)](https://en.wikipedia.org/wiki/C%2B%2B23)

*ViewTouch is a registered trademark in the USA*

Expand Down Expand Up @@ -59,6 +59,23 @@ ViewTouch is a powerful, open-source Point of Sale system designed specifically

See the [Wiki](../../wiki) for detailed build instructions and development setup. Make sure your display is 1920 x 1080.

**Basic Build Instructions:**

```bash
# Install dependencies (Ubuntu/Debian)
sudo apt-get update
sudo apt-get install -y build-essential cmake xorg-dev libmotif-dev libfreetype6-dev libcurl4-gnutls-dev

# Clone and build
git clone https://github.com/ViewTouch/viewtouch.git
cd viewtouch
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)
cmake --build build --target install
```

For more detailed instructions and development setup, see the [Wiki](../../wiki).

---

## Hardware
Expand Down Expand Up @@ -231,4 +248,4 @@ ViewTouch does not manage electronic payment processing. Please make your own de

Made with ❤️ by the ViewTouch community

</div>
</div>
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ The following versions of ViewTouch are currently supported with security update

| Version | Supported | Notes |
| ------- | ------------------ | ----- |
| 25.03.x | :white_check_mark: | Current stable release |
| < 25.03 | :x: | End of life |
| 26.01.x | :white_check_mark: | Current stable release |
| < 26.01 | :x: | End of life |

**Note**: Only the latest stable release receives security updates. For the latest version information, please check the project repository.

Expand Down
5 changes: 3 additions & 2 deletions cdu/cdu_main.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright ViewTouch, Inc., 1995, 1996, 1997, 1998, 2025
* Copyright ViewTouch, Inc., 1995, 1996, 1997, 1998, 2025, 2026

* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -34,6 +34,7 @@
#include "cdu_att.hh"
#include "socket.hh"
#include "utility.hh"
#include "src/utils/cpp23_utils.hh"

#ifdef DMALLOC
#include <dmalloc.h>
Expand Down Expand Up @@ -219,7 +220,7 @@ int main(int argc, const char* argv[])
else
{
std::array<char, STRLENGTH> error_message{};
std::snprintf(error_message.data(), error_message.size(), "Could not write %s", g_deviceName.c_str());
vt::cpp23::format_to_buffer(error_message.data(), error_message.size(), "Could not write {}", g_deviceName.c_str());
perror(error_message.data());
}
}
Expand Down
4 changes: 2 additions & 2 deletions config/version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/gen_compiler_tag.cmake)
set(PROJECT_IDENTIFIER ${TOP_PROJECT_UPPER})

# The version number.
set (ViewTouch_VERSION_MAJOR 25)
set (ViewTouch_VERSION_MINOR 03)
set (ViewTouch_VERSION_MAJOR 26)
set (ViewTouch_VERSION_MINOR 0)
set (ViewTouch_VERSION_PATCH 1)

# generate short version string <MAJOR>.<MINOR>.<PATCH>
Expand Down
43 changes: 43 additions & 0 deletions docs/BUILD_OPTIMIZATIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Build Optimizations Guide

This page documents the new CMake options and recommended workflows for build-time optimizations.

Options added to the top-level `CMakeLists.txt`:

- `VT_ENABLE_LTO` (ON/OFF): enable interprocedural optimization support.
- `VT_LTO_MODE` (off|thin|full): choose ThinLTO (default `thin`) or full LTO.
- `VT_USE_CCACHE` (ON/OFF): enable use of `ccache` if present on PATH.
- `VT_ENABLE_PGO` (ON/OFF): enable PGO scaffolding.
- `VT_PGO_PHASE` (off|generate|use): set the PGO phase.

Quick examples

1) Configure a Release build with ThinLTO and ccache (recommended):

```bash
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DVT_USE_CCACHE=ON -DVT_ENABLE_LTO=ON -DVT_LTO_MODE=thin
cmake --build build -j$(nproc)
```

2) PGO workflow (generate -> run -> use):

# Generate profile
```bash
cmake -S . -B build/pgo-generate -DCMAKE_BUILD_TYPE=Release -DVT_ENABLE_PGO=ON -DVT_PGO_PHASE=generate
cmake --build build/pgo-generate -j$(nproc)
# Run the instrumented binaries to produce profile data (exercise hotspots)
./build/pgo-generate/vt_main [args...]

# Use profile
cmake -S . -B build/pgo-use -DCMAKE_BUILD_TYPE=Release -DVT_ENABLE_PGO=ON -DVT_PGO_PHASE=use
cmake --build build/pgo-use -j$(nproc)
```

Notes and recommendations

- ThinLTO is the best tradeoff between link time and optimization for incremental builds.
- `ccache` greatly speeds up iterative development builds — ensure it is installed if enabled.
- PGO requires two phases: `generate` (build instrumented binaries, run them) and `use` (rebuild using gathered profile data).
- Performance compiler flags are applied only to `Release` and `RelWithDebInfo` builds by default.

If you want CI integration, add a job that runs a Release build with `-DVT_ENABLE_LTO=ON -DVT_LTO_MODE=thin` and records binary size and a small smoke test. For PGO, consider a two-stage CI job or manual profiling step.
Loading
Loading