Skip to content

refactor: modernize CMake build system and improve portability - #93

Merged
martin-olivier merged 5 commits into
martin-olivier:mainfrom
abin-z:main
Jul 3, 2026
Merged

refactor: modernize CMake build system and improve portability#93
martin-olivier merged 5 commits into
martin-olivier:mainfrom
abin-z:main

Conversation

@abin-z

@abin-z abin-z commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

Overview

This PR modernizes the CMake build system for the dylib project, improving maintainability, portability, and adherence to modern CMake best practices while remaining compatible with CMake 3.11.

Changes

  1. Modernized C++ standard handling
  • Replaced global CMAKE_CXX_STANDARD configuration
  • Enforced C++11 using target-based approach:
target_compile_features(dylib PUBLIC cxx_std_11)
  1. Migrated source definition to target-based model
  • Replaced set(SOURCES) + add_library(... ${SOURCES})
  • Adopted target_sources() for better modularity
  1. Improved platform portability for dynamic linking
  • Replaced direct dl linkage with CMake-provided variable:
target_link_libraries(dylib PRIVATE ${CMAKE_DL_LIBS})

Summary

This refactor aligns the project with modern CMake practices while maintaining strict compatibility with CMake 3.11 and preserving existing behavior.

@martin-olivier martin-olivier self-assigned this Jul 3, 2026
@martin-olivier
martin-olivier merged commit 64e8f90 into martin-olivier:main Jul 3, 2026
69 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants