Skip to content

CMake: Deprecate ENABLE_LIBCOMM and rename options#7620

Open
Growl1234 wants to merge 8 commits into
deepmodeling:developfrom
Growl1234:cmake
Open

CMake: Deprecate ENABLE_LIBCOMM and rename options#7620
Growl1234 wants to merge 8 commits into
deepmodeling:developfrom
Growl1234:cmake

Conversation

@Growl1234

Copy link
Copy Markdown

This PR renames and migrates several CMake options and deprecates the redundant ENABLE_LIBCOMM option.

  • Replace remaining internal uses of:
    • USE_OPENMP with ENABLE_OPENMP
    • USE_ELPA with ENABLE_ELPA
    • USE_ABACUS_LIBM with ENABLE_ABACUS_LIBM
    • INFO with MATH_INFO
  • Drop unused ENABLE_DEEPKS and ENABLE_MLKEDF.
  • Rename the internal USE_ABACUS_LIBM preprocessor definition to __ABACUS_LIBM, avoiding confusion with the deprecated CMake option of the same name.
  • Keep the old names only in the compatibility logic that forwards their values to the corresponding new options and removes the deprecated cache entries.
  • Deprecate ENABLE_LIBCOMM, since LibComm is an implementation dependency of LibRI rather than an independently configurable ABACUS feature.
  • Update the documentation and examples to use the current option names.

Compatibility

Existing configurations using the old option names remain temporarily supported through the compatibility layer and emit deprecation warnings. Users should migrate to the new names, as support for the old options may be removed in a future release.

Copilot AI review requested due to automatic review settings July 12, 2026 03:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@QuantumMisaka QuantumMisaka left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rule: CMake option migration completeness
Severity: error
Location: toolchain/build_abacus_gnu.sh:68 and generate_build_info.sh:66
Reason: This PR states that the old option names remain only in the compatibility layer, but repository-owned configuration entry points still pass/read USE_OPENMP and USE_ELPA. The same stale configure flags are present in toolchain/build_abacus_gcc-mkl.sh, toolchain/build_abacus_intel.sh, toolchain/build_abacus_gcc-aocl.sh, toolchain/build_abacus_aocc-aocl.sh, and toolchain/build_abacus_windows.sh; generate_build_info.sh still consumes USE_ELPA. Each invocation therefore emits deprecation warnings, and these scripts will break when the compatibility layer is removed.
Suggested action: Migrate these ABACUS CMake invocations and the ELPA build-info checks to ENABLE_OPENMP/ENABLE_ELPA in this PR (and update any corresponding toolchain documentation).
Exception: not allowed

Comment thread CMakeLists.txt
Comment thread CMakeLists.txt
Comment thread toolchain/build_abacus_windows.sh
@Growl1234

Copy link
Copy Markdown
Author

Thank you, I've adjusted building scripts under toolchain folder.

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