Skip to content

Conversation

@zach2good
Copy link
Contributor

@zach2good zach2good commented Oct 5, 2025

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

We're due for a rewrite, it's been 5 years since I did the last one.

I want to achieve a loop of:

  • Configure section
  • Output report for that section

Then, if there's an error during configuration, you'll still have a bunch of information you can share to get help, but you won't have a full and broken report - just the parts that have succeeded, and then your broken line. Then we exit.

Still TODO:

  • Everything on Linux/MacOS
  • Making sure build caching "just works" on Linux/MacOs
  • Confirm Sanitisers all work on Linux (possibly on Windows too?)
  • Confirm Valgrind works on Linux
  • Confirm clang-tidy works
  • Fix those warnings in external deps so a Ninja build builds completely quietly
  • Upgrade/update external deps
  • Continue auditing build/warning flags
  • Ensure "Quickstart" "Open and build with VS" workflow is intact, even though it sucks
  • Update docs to reflect the state of everything when done

Done:

This will do many things; it will also do nothing.

  • Windows Debug/RelWithDebugInfo builds
  • Ensure CPM caching
  • Ensure build caching (wherever possible)
  • Kill PCH (but might conditionally bring back for builds where it won't interfere)
  • Confirm C++20 on all platforms
  • Enforce the use of the correct compilers
  • Better VSCode integration
  • Easier to work with the build
  • Audit compiler/linker flags
  • The build should be about as fast as it is now. Future work will focus on splitting dependencies and optimising the build process.

More user-friendly configuration output of the form:

C:\ffxi\server>cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug
-- The C compiler identification is MSVC 19.44.35217.0
-- The CXX compiler identification is MSVC 19.44.35217.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.38.1.windows.1")
-- LTO disabled by default for Debug builds (user can override with -DENABLE_LTO=ON)
--
-- No compiler cache found (ccache/sccache)
-- === Build Environment ===
--
--   CMake Version:        3.31.0
--   System:               Windows 10.0.26100
--   Processor:            AMD64 (64-bit)
--   Generator:            Ninja
--   Build Type:           Debug
--   Source Directory:     C:/ffxi/server
--   Binary Directory:     C:/ffxi/server/build
--   Build Cache:          None
--
-- === Build Options ===
--
--   Warnings as Errors:   ON
--   Fast Math:            ON
--   LTO:                  OFF
--   Security Hardening:   ON
--   Tracy Profiling:      OFF
--   Clang-Tidy:           OFF
--   Clang-Tidy Auto-Fix:  OFF
--   Valgrind:             OFF
--
-- === Compiler Configuration ===
--
--   Compiler ID:          MSVC
--   Compiler Version:     19.44.35217.0
--   C++ Standard:         C++20
--   C Compiler:           C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe
--   C++ Compiler:         C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe
--   Linker:               C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/link.exe
--
-- === Compiler Flags ===
--
--   Base C Flags:         /DWIN32 /D_WINDOWS
--   Base C++ Flags:       /DWIN32 /D_WINDOWS /EHsc
--   Build Type Flags:     /Ob0 /Od /RTC1
--   Linker Flags:         /machine:x64
--
-- === Git Information ===
--
--   GIT_SHA1:             a100be054e-dirty
--   GIT_BRANCH:           cmake_rewrite
--   GIT_DATE:             Sun Oct 5 11:35:56 2025
--   GIT_COMMIT_SUBJECT:   Fix build
--
-- === System Dependencies ===
--
-- Found Python: C:/Users/zrtoo/AppData/Local/Programs/Python/Python312/python.exe (found version "3.12.7") found components: Interpreter
-- Python_EXECUTABLE: C:/Users/zrtoo/AppData/Local/Programs/Python/Python312/python.exe
-- Python_VERSION: 3.12.7
-- ENABLE_TRACY: OFF
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Found MariaDB: C:/ffxi/server/ext/mariadb/lib64/libmariadb64.lib
-- MARIADB_FOUND: TRUE
-- MARIADB_LIBRARY: C:/ffxi/server/ext/mariadb/lib64/libmariadb64.lib
-- MARIADB_INCLUDE_DIR: C:/ffxi/server/ext/mariadb/include/
-- Looking for prebuilt MariaDB Connector/C++
-- Found MariaDBCPP: C:/ffxi/server/ext/mariadbcpp/lib64/mariadbcpp.lib
-- MARIADBCPP_FOUND: TRUE
-- MARIADBCPP_LIBRARY: C:/ffxi/server/ext/mariadbcpp/lib64/mariadbcpp.lib
-- MARIADBCPP_INCLUDE_DIR: C:/ffxi/server/ext/mariadbcpp/include/
-- Found ZeroMQ: C:/ffxi/server/ext/zmq/lib64/libzmq_64.lib
-- ZeroMQ_FOUND: TRUE
-- ZeroMQ_LIBRARY: C:/ffxi/server/ext/zmq/lib64/libzmq_64.lib
-- ZeroMQ_INCLUDE_DIR: C:/ffxi/server/ext/zmq/include/zmq/
-- Found LuaJIT: C:/ffxi/server/ext/luajit/lib64/libluajit_64.lib
-- LuaJIT_FOUND: TRUE
-- LuaJIT_LIBRARY: C:/ffxi/server/ext/luajit/lib64/libluajit_64.lib
-- LuaJIT_INCLUDE_DIR: C:/ffxi/server/ext/luajit/include/
-- Found OpenSSLlibcrypto: C:/ffxi/server/ext/openssl/lib64/libcrypto.lib
-- OpenSSLlibcrypto_FOUND: TRUE
-- OpenSSLlibcrypto_LIBRARY: C:/ffxi/server/ext/openssl/lib64/libcrypto.lib
-- OpenSSLlibcrypto_INCLUDE_DIR: C:/ffxi/server/ext/openssl/include/
-- Found OpenSSLlibssl: C:/ffxi/server/ext/openssl/lib64/libssl.lib
-- OpenSSLlibssl_FOUND: TRUE
-- OpenSSLlibssl_LIBRARY: C:/ffxi/server/ext/openssl/lib64/libssl.lib
-- OpenSSLlibssl_INCLUDE_DIR: C:/ffxi/server/ext/openssl/include/
--
-- === External Packages (CPM) ===
--
--   CPM Cache Directory:  C:/ffxi/server/.cpm-cache
--
-- Configuring CPM packages...
--
-- Version: 10.1.0
-- Build type: Debug
-- CPM: Adding package [email protected] (10.1.1 at C:/ffxi/server/.cpm-cache/fmt/01ac001d8da09bd242594dc67d36dccb9854883e)
-- Build spdlog: 1.15.0
-- Build type: Debug
-- CPM: Adding package [email protected] (v1.15.0 at C:/ffxi/server/.cpm-cache/spdlog/12508e60ef742a41db4d8db5a4334e10142c995d)
-- CPM: Adding package recastnavigation@0 (bd98d84c274ee06842bf51a4088ca82ac71f8c2d at C:/ffxi/server/.cpm-cache/recastnavigation/e7d11db6a21c0fe252daa4d78de4690a8e03438a)
-- CPM: Adding package fast_obj@0 (8145eb0a942784e5491a2e6b50008ce0fe3aa203 at C:/ffxi/server/.cpm-cache/fast_obj/0fd9e24f3928a4488a541074267752d263d5f4d0)
-- CPM: Adding package argparse@0 (d924b84eba1f0f0adf38b20b7b4829f6f65b6570 at C:/ffxi/server/.cpm-cache/argparse/9cea4917b2970c78de6877229edae62480f088e8)
-- CPM: Adding package efsw@0 (62f785c56b7a34f035193d4cb831921347b586b8 at C:/ffxi/server/.cpm-cache/efsw/a16e46965765185e7ebf5e40218161a3cf726cbf)
-- Project 'jthread_lite', package 'jthread-lite' version: '0.1.0'
-- CPM: Adding package jthread-lite@0 (fffbe32e4d95cd7a444f8aa74f01e0c975568649 at C:/ffxi/server/.cpm-cache/jthread-lite/56f8a27bb469766ee758518fc85e149d879f36ae)
-- Project 'expected_lite', package 'expected-lite' version: '0.8.0'
-- CPM: Adding package expected-lite@0 (48e5e2294689eac07fc5ae6784355941e9add475 at C:/ffxi/server/.cpm-cache/expected-lite/bddbd6cec2a355865273eb290041d6a85eb5443d)
-- CPM: Adding package [email protected] (v0.18.3 at C:/ffxi/server/.cpm-cache/cpp-httplib/f74098dbd008f884cbe5f6073d713de9fb1b8e37)
-- Using the multi-header code from C:/ffxi/server/.cpm-cache/json/d0f2b4238d78c646e33db2a43c03510c9aa59246/include/
-- CPM: Adding package json@0 (9f60e855576bb1e95f39ab23b3821982cccb0bab at C:/ffxi/server/.cpm-cache/json/d0f2b4238d78c646e33db2a43c03510c9aa59246)
-- CPM: Adding package pcg-cpp@0 (428802d1a5634f96bcd0705fab379ff0113bcf13 at C:/ffxi/server/.cpm-cache/pcg-cpp/7561d718805487e2397ee23ff00d83a7169f8410)
-- CPM: Adding package [email protected] (asio-1-32-0 at C:/ffxi/server/.cpm-cache/asio/19925d2645301009520692d1c3a8fc80116fe6d3)
-- CPM: Adding package bcrypt@0 (fb50b847ae760f16ab84a367452027b246df13e1 at C:/ffxi/server/.cpm-cache/bcrypt/539f327ccb0a8de9e3b01fddbb8dc6163f68d5cf)
-- CPM: Adding package alpaca@0 (83a592f0c3807500f1aaf3b07fd48105a01e2780 at C:/ffxi/server/.cpm-cache/alpaca/34cb0e348cb5ccfd0d61b534464405836b7869cb)
-- CPM: Adding package magic_enum@0 (1a1824df7ac798177a521eed952720681b0bf482 at C:/ffxi/server/.cpm-cache/magic_enum/5bd64323c5ac507efdb9fe606a09eef8b013e092)
-- CPM: Adding package termcolor@0 (89f20096bef51de347ec6f99345f65147359bd7c at C:/ffxi/server/.cpm-cache/termcolor/32234b984804180e5880f4ad6e1a24dca188a1c0)
--
-- === Code Generation ===
--
-- Configuring src/common/version.cpp
-- Generating IPC stubs
-- Calling: C:/Users/zrtoo/AppData/Local/Programs/Python/Python312/python.exe C:/ffxi/server/tools/generate_ipc_stubs.py C:/ffxi/server/build
Generating ipc stubs...
Output directory: C:\ffxi\server\build\generated
File generated.
--
-- === Module Processing ===
--
-- The following files will be added to the build:
--   - C:/ffxi/server/modules/example/cpp/example.cpp
--
-- Module processing complete:
--   - Include directories: 0
--   - Source files:        1
--   - CMake includes:      0
--
-- === xi_map Target Flags ===
--
--   Compile Options:      /GR /Oy- /MP /FS /bigobj /utf-8 /MDd /WX /W4 /permissive- /wd4100 /wd4127 /wd4201 /wd4242 /wd4244 /wd4245 /wd4456 /wd4457 /wd4458 /wd4459 /wd5272 /wd4554
--   Compile Definitions:  SOL_ALL_SAFETIES_ON=1 SOL_NO_CHECK_NUMBER_PRECISION=1 SOL_DEFAULT_PASS_ON_ERROR=1 SOL_PRINT_ERRORS=0 RC_FAST_MATH=1 SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_DEBUG _CONSOLE _MBCS NOMINMAX _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_DEPRECATE _WIN32_WINNT=0x0A00
--   Link Options:         (none)
--
-- === Configuration Complete ===
--
--   Build files written to: C:/ffxi/server/build
--   Ready to build with: cmake --build C:/ffxi/server/build --parallel
--
--   This is a !!! Debug !!! build: Fastest recompile time and maximum debug info.
--
-- Configuring done (5.2s)
-- Generating done (0.7s)
-- Build files have been written to: C:/ffxi/server/build

C:\ffxi\server>cmake --build build --config Debug --parallel
[136/703] Building C object CMakeFiles\bcrypt.dir\.cpm-cache\bcrypt\539f327ccb0a8de9e3b01fddbb8dc6163f68d5cf\src\bcrypt.c.obj
C:\ffxi\server\.cpm-cache\bcrypt\539f327ccb0a8de9e3b01fddbb8dc6163f68d5cf\src\../include/bcrypt/bcrypt.h(17): warning C4005: 'BCRYPT_HASHSIZE': macro redefinition
C:\ffxi\server\.cpm-cache\bcrypt\539f327ccb0a8de9e3b01fddbb8dc6163f68d5cf\src\bcrypt.c(32): note: see previous definition of 'BCRYPT_HASHSIZE'
C:\ffxi\server\.cpm-cache\bcrypt\539f327ccb0a8de9e3b01fddbb8dc6163f68d5cf\src\bcrypt.c(158): warning C4047: '=': 'char *' differs in levels of indirection from 'int'
C:\ffxi\server\.cpm-cache\bcrypt\539f327ccb0a8de9e3b01fddbb8dc6163f68d5cf\src\bcrypt.c(166): warning C4047: '=': 'char *' differs in levels of indirection from 'int'
[703/703] Linking CXX executable C:\ffxi\server\xi_test.exe

C:\ffxi\server>

@cocosolos cocosolos mentioned this pull request Oct 8, 2025
4 tasks
@github-actions
Copy link

This PR has been automatically marked as stale because
it has not had recent activity. It will be closed if no
further activity occurs.

@github-actions github-actions bot added the stale label Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants