Skip to content

Conversation

@Alan-Jowett
Copy link

@Alan-Jowett Alan-Jowett commented Oct 31, 2025

This pull request introduces significant improvements to cross-platform compatibility and CMake configuration for the CUDD project. The changes add platform-specific CMake modules for Windows and Unix, enhance CMake workflow automation, and improve handling of dependencies and build options based on the environment. There are also updates to CI workflows to better support Windows builds and conditional test execution depending on CMake version compatibility.

Platform-specific build system enhancements:

  • Added new CMake modules: cmake/windows.cmake and cmake/unix.cmake, which encapsulate platform-specific configuration for shared libraries, compiler flags, library linking, and development tools. These modules are now included conditionally in CMakeLists.txt based on the target platform, and their functions are used to manage build constraints and environment setup. [1] [2] [3] [4] [5]
  • On Windows, shared library builds are now blocked due to DLL linkage issues, enforcing static builds only. On Unix, shared libraries are supported as before. Math and networking libraries are now linked in a platform-aware way. [1] [2] [3]

CMake and CI workflow improvements:

  • Updated GitHub Actions workflows (test_cmake.yml, test_toolset.yml) to automatically detect the CMake version and enable or disable tests accordingly. Tests are only run if CMake ≥ 3.28, due to new requirements for the dddmp dependency; this prevents build failures on older CMake versions. [1] [2]
  • Added a new Windows CI workflow (test_windows.yml) that builds and tests the project using static libraries and supports both Release and Debug configurations.

CMake configuration and options:

  • The default for CUDD_RECONFIGURE_SYSTEM is now ON, enabling more robust system variable configuration.
  • Added version checks and warnings in CMakeLists.txt to alert users when attempting to build tests with an incompatible CMake version (<3.28).
  • Improved documentation in CMakeLists.txt about minimum CMake version requirements and compatibility workarounds for older versions.

System and platform checks:

  • Enhanced system function checks in cmake/cudd_configure_system.cmake to set required math function flags for Windows, preventing configuration errors. [1] [2]

Cleanup and modernization:

  • Removed the legacy src/config.h file, which contained hardcoded configuration macros now handled dynamically by CMake.

These changes collectively make the build system more robust, easier to maintain, and better suited for modern development environments across both Windows and Unix platforms.

@doganulus
Copy link
Member

I do not have much development on Windows so I have a few questions. Before that, I think keeping everything Windows related separate is a good idea and I like having a separate workflow to check Windows builds.

My question is whether this could be done without touching CMakeLists.txt at several places and keeping everything under windows.cmake or similar.

Anyway I didn't look at how much we actually need this configuration checks on modern platforms. Any comments or ideas on that?

@doganulus
Copy link
Member

@Alan-Jowett Also the most recent branch is https://github.com/cuddorg/cudd/tree/4.0.0

Sorry for the confusion. The development branch was not stable in the beginning so I used develop but changed it to 4.0.0.

@Alan-Jowett
Copy link
Author

Thank you for the feedback. I will rebase this onto the 4.0.0 branch and see if I can consolidate the Windows specific parts into a windows.cmake file.

@Alan-Jowett Alan-Jowett changed the base branch from develop to 4.0.0 November 5, 2025 17:13
@Alan-Jowett Alan-Jowett force-pushed the windows_cmake_build branch 10 times, most recently from 80c4901 to 8f48182 Compare November 7, 2025 14:50
@coveralls
Copy link

coveralls commented Nov 7, 2025

Pull Request Test Coverage Report for Build 19276984450

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 0.547%

Totals Coverage Status
Change from base Build 19267003540: 0.0%
Covered Lines: 162
Relevant Lines: 29604

💛 - Coveralls

@Alan-Jowett Alan-Jowett force-pushed the windows_cmake_build branch 3 times, most recently from b864649 to 7939924 Compare November 11, 2025 19:47
Signed-off-by: Alan Jowett <alan.jowett@microsoft.com>
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.

3 participants