Windows cmake build #22
Open
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 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:
cmake/windows.cmakeandcmake/unix.cmake, which encapsulate platform-specific configuration for shared libraries, compiler flags, library linking, and development tools. These modules are now included conditionally inCMakeLists.txtbased on the target platform, and their functions are used to manage build constraints and environment setup. [1] [2] [3] [4] [5]CMake and CI workflow improvements:
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]test_windows.yml) that builds and tests the project using static libraries and supports both Release and Debug configurations.CMake configuration and options:
CUDD_RECONFIGURE_SYSTEMis nowON, enabling more robust system variable configuration.CMakeLists.txtto alert users when attempting to build tests with an incompatible CMake version (<3.28).CMakeLists.txtabout minimum CMake version requirements and compatibility workarounds for older versions.System and platform checks:
cmake/cudd_configure_system.cmaketo set required math function flags for Windows, preventing configuration errors. [1] [2]Cleanup and modernization:
src/config.hfile, 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.