firebird
firebird copied to clipboard
[build][cmake] Update cmake to compile again
Heya guys!
This PR provides a update to the CMake build system. My goal was to fix the compilation on Linux (tested on Fedora).
Here is a summary of the main changes:
Key Improvements
- Modernized CMake: Bumped minimum version to 3.20 and set C++23 / C17 standards globally.
- Platform/CPU Detection: This adds proper preprocessor definitions (e.g.,
LINUX,AMD64). - Dependency Management:
- Add
libcdsandre2libraries into the build. - Added
USE_SYSTEM_BOOSTandUSE_SYSTEM_RE2options to allow choosing between embedded and system-wide libraries.
- Add
- Build Process Cleanup:
- Removed the commands for generating
msg.fdb. - Removed obsolete build targets (
codes) and references to deleted source files.
- Removed the commands for generating
- Source File Synchronization:
- Added new source files to
CMakeLists.txtthat were missing (e.g., injrd,remote). - Removed references to files that no longer exist.
- Added new source files to
After these changes, I was able to get a successful compilation on Fedora. This is my first contribution, and I'm happy to make any adjustments needed.
What is the build commands that works? I tried this and it failled:
cmake -S . -B build-cmake
...
-- Configuring done (9.2s)
CMake Error at src/CMakeLists.txt:997 (add_executable):
Cannot find source file:
misc/makeHeader.cpp
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm
.ccm .cxxm .c++m .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90
.f95 .f03 .hip .ispc
CMake Error at src/CMakeLists.txt:138 (add_custom_target):
Cannot find source file:
/tmp/fb-cmake/src/msgs/facilities2.sql
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm
.ccm .cxxm .c++m .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90
.f95 .f03 .hip .ispc
CMake Error at src/CMakeLists.txt:997 (add_executable):
No SOURCES given to target: makeHeader