Skip to content

[MDAPI-246][С++] Build a project with statically linked runtime libraries. #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Apr 10, 2025

Conversation

AnatolyKalin
Copy link
Collaborator

No description provided.

Converted lambdas to `inline` where applicable for better optimization. Added macros to suppress specific GCC warnings across multiple files to ensure cleaner builds. Minor improvements in code organization and header inclusions.
…ries.

Replaced `DXFCPP_EXPORT` annotations with comments in specific structs to control export behavior more flexibly. Added `DXFCXX_DYNAMICALLY_LINK_UNIT_TESTS` option in CMake for dynamic linking of unit tests, enhancing configurability.
Commented out an unused include in MarketDepthModelTest.cpp, set DXFCXX_DYNAMICALLY_LINK_UNIT_TESTS to OFF in CMakeLists.txt, and removed a failing test case from DataIntegrityTest. These changes clean up the codebase and align the build configuration with testing requirements.
Introduced conditional dynamic linking for C++ samples based on the DXFCXX_DYNAMICALLY_LINK_SAMPLES flag. Updated CMakeLists.txt files and added logic to handle runtime dependencies and properly configure installation setups.
Updated CMake options to toggle dynamic linking for tools and samples. Added `DXFCPP_EXPORT` to required functions for proper symbol exports. Revised build scripts to handle dynamic linking dependencies and post-build installation.
Introduced support for the `DXFCXX_LINK_STATIC_RUNTIME` option to enable static runtime linking (`/MT` or `/MTd`) for MSVC. This applies to both the main library and associated samples or tools when this option is enabled.
Introduce dedicated steps in the GitHub Actions workflow for building and configuring CMake with multi-threaded runtime on Windows. This ensures proper handling of static runtime linkage and improves build parallelism for Windows-specific configurations.
This commit introduces steps for preparing, building, and packaging Windows static builds with the multi-threaded runtime (MT). It updates GitHub workflows and CMake configurations to enable the `DXFCXX_LINK_STATIC_RUNTIME` option and adjusts related packaging and artifact upload processes.
Added an option to link the static runtime in `CMakeLists.txt` with configurable runtime library behavior for MSVC. Updated the GitHub Actions workflow to set `DXFCXX_LINK_STATIC_RUNTIME=ON` during the build process.
Updated ReleaseNotes.md to document the preparation of Windows library releases linked statically with runtime libraries. These artifacts are named with the `-static-mt` suffix to indicate their static runtime linkage.
@ttldtor ttldtor merged commit 0b92062 into main Apr 10, 2025
63 checks passed
@ttldtor ttldtor deleted the feature/MDAPI-246 branch April 10, 2025 16:29
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