Add CMake support for linuxptp project#25
Open
shkwon98 wants to merge 2 commits intorichardcochran:masterfrom
Open
Add CMake support for linuxptp project#25shkwon98 wants to merge 2 commits intorichardcochran:masterfrom
shkwon98 wants to merge 2 commits intorichardcochran:masterfrom
Conversation
added 2 commits
September 4, 2025 16:56
- Introduced CMakeLists.txt to manage build configuration. - Set minimum CMake version to 3.16 and defined project name. - Added option to enable OpenSSL support. - Configured compilation options and preprocessor definitions. - Defined source groups for various components including security-related sources. - Established installation rules for the built executables.
- Adjusted formatting of execute_process calls for version and incdefs scripts. - Consolidated source lists for executables to enhance clarity. - Added installation of man pages for all programs.
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a comprehensive CMake build system for the linuxptp project, replacing or supplementing the existing build mechanisms. The new configuration provides modern build practices, configurable security backends, and improved source organization.
- Adds complete CMake configuration with version detection and compiler definition handling
- Implements configurable OpenSSL support with dynamic selection of cryptographic backends
- Organizes source files into logical groups and defines all major executables with proper dependencies
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new
CMakeLists.txtbuild system for the project, replacing or supplementing previous build mechanisms. The new configuration improves build flexibility, modularity, and maintainability by leveraging CMake's features and modern practices. The most important changes are grouped below.Build system modernization:
CMakeLists.txtfile to support building the project with CMake, including minimum version requirements and project metadata.Configurable security and feature options:
USE_OPENSSLoption to enable or disable OpenSSL support, and dynamically selects cryptographic backends (Nettle, GnuTLS, GnuPG, OpenSSL) and source files based on detected compiler definitions.Improved source organization and executable definitions:
FILTERS,SERVOS,TRANSP,TS2PHC, etc.) and provided a helper macroadd_ptp_executablefor consistent executable declarations.ptp4l,nsm,pmc,phc2sys,hwstamp_ctl,phc_ctl,timemaster,ts2phc,tz2alt) with their respective source files and dependencies. (F8d