Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
3386bd8
BUILD: Added a simple build process.
wouterbeek Jun 20, 2026
6b49878
FIXED: Manual integration of files GUI.h and Gui.h (these are conside…
wouterbeek Jun 20, 2026
4068156
CLEAN: Removed the workaround for MSVC versions that do not implement…
wouterbeek Jun 20, 2026
ce49e1c
FIXED: Due to a missing include, the reworked vector class could not …
wouterbeek Jun 20, 2026
b290022
FIXED: Missing narrowing case in list-initialization context.
wouterbeek Jun 20, 2026
6c62764
FIXED: Inconsistent declarations and duplicate definition for Simple_…
wouterbeek Jun 20, 2026
ec198c1
FIXED: Duplicate definition for Simple_window::cb_next().
wouterbeek Jun 20, 2026
3384ff0
FIXED: Duplicate definition for Simple_window::next().
wouterbeek Jun 20, 2026
570462c
FIXED: std::ifstream no longer has an implicit conversion to void* (w…
wouterbeek Jun 20, 2026
13f004f
DOC: Documented the fixes that were necessary to compile the original…
wouterbeek Jun 20, 2026
54bac32
ADDED: Chapter 12 examples.
wouterbeek Jun 20, 2026
8d364df
BUILD: Moved header files to subdirectory 'include' and sources files…
wouterbeek Jun 20, 2026
23eab90
BUILD: Automatically generate a compile_commands.json file. This file…
wouterbeek Jun 20, 2026
1498307
BUILD: Removed mass include header fltk.hpp. Instead, each header inc…
wouterbeek Jun 20, 2026
d36a5cc
CLEAN: Removed the undef for major/minor. The potentially conflicting…
wouterbeek Jun 20, 2026
e09e4cb
DOC: Documented more fixes and changes.
wouterbeek Jun 20, 2026
fc39b25
BUILD: Use Clang Format for uniform formatting.
wouterbeek Jun 21, 2026
92959a6
ADDED: Some examples from chapter 13.
wouterbeek Jun 30, 2026
d49c06e
BUILD: Set project name and website.
wouterbeek Jun 30, 2026
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
2 changes: 2 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BasedOnStyle: LLVM
Language: Cpp
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
38 changes: 38 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
cmake_minimum_required(VERSION 4.3.4)
project(ppp-cpp
DESCRIPTION "Programming Principles and Practice using C++"
HOMEPAGE_URL https://github.com/wouterbeek/Programming-_Principles_and_Practice_Using_Cpp
LANGUAGES CXX
VERSION 0.1.0
)

set(cppVersion 23)
set(CXX_EXTENSIONS OFF)
set(CXX_STANDARD ${cppVersion})
set(CXX_STANDARD_REQUIRED ON)

add_library(base INTERFACE)
add_library(${PROJECT_NAME}::base ALIAS base)
target_compile_features(base INTERFACE cxx_std_${cppVersion})

find_package(fltk REQUIRED)

add_library(ppp STATIC)
add_library(${PROJECT_NAME}::ppp ALIAS ppp)
target_include_directories(ppp PUBLIC include)
target_link_libraries(ppp PUBLIC fltk::fltk ${PROJECT_NAME}::base)
target_sources(ppp
PRIVATE
src/Graph_lib/Graph.cpp
src/Graph_lib/GUI.cpp
src/Graph_lib/Simple_window.cpp
src/Graph_lib/Window.cpp
)

add_executable(chapter12)
target_link_libraries(chapter12 PRIVATE ${PROJECT_NAME}::ppp)
target_sources(chapter12 PRIVATE tool/chapter12.cpp)

add_executable(chapter13)
target_link_libraries(chapter13 PRIVATE ${PROJECT_NAME}::ppp)
target_sources(chapter13 PRIVATE tool/chapter13.cpp)
108 changes: 108 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"version": 11,
"cmakeMinimumRequired": {
"major": 4,
"minor": 3,
"patch": 4
},
"configurePresets": [
{
"binaryDir": "${sourceDir}/build/${presetName}",
"cacheVariables": {
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
},
"hidden": true,
"installDir": "${sourceDir}/install/${presetName}",
"name": "base",
"toolchainFile": "${sourceDir}/build/conan_toolchain.cmake"
},
{
"cacheVariables": {
"CMAKE_CXX_COMPILER": "g++"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
},
"generator": "Ninja",
"hidden": true,
"inherits": "base",
"name": "linux-base"
},
{
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
},
"displayName": "Linux Debug",
"inherits": "linux-base",
"name": "linux-debug"
},
{
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
},
"displayName": "Linux Release",
"inherits": "linux-base",
"name": "linux-release"
},
{
"cacheVariables": {
"CMAKE_CXX_COMPILER": "cl.exe",
"CMAKE_PREFIX_PATH": "${sourceDir}/build"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"generator": "Ninja",
"hidden": true,
"inherits": "base",
"name": "windows-base",
"vendor": {
"microsoft.com/VisualStudioSettings/CMake/1.0": {
"hostOS": ["Windows"],
"intelliSenseMode": "windows-msvc-x64"
},
"microsoft.com/VisualStudioRemoteSettings/CMake/1.0": {
"hostOS": ["Windows"]
}
}
},
{
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
},
"displayName": "Windows Debug",
"inherits": "windows-base",
"name": "windows-debug"
},
{
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
},
"displayName": "Windows Release",
"inherits": "windows-base",
"name": "windows-release"
}
],
"buildPresets": [
{
"configurePreset": "linux-debug",
"name": "linux-debug"
},
{
"configurePreset": "linux-release",
"name": "linux-release"
},
{
"configurePreset": "windows-debug",
"name": "windows-debug"
},
{
"configurePreset": "windows-release",
"name": "windows-release"
}
]
}
83 changes: 0 additions & 83 deletions GUI.cpp

This file was deleted.

133 changes: 0 additions & 133 deletions GUI.h

This file was deleted.

Loading