Skip to content
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

Fix compiler ids regex matching #4272

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

nmnobre
Copy link
Contributor

@nmnobre nmnobre commented Dec 18, 2024

Fixes #2978.

Summary

To understand what I'm trying to fix here, first note:

target_compile_options( Flags_CXX
INTERFACE
$<${_cxx_gnu_dbg}:-O0 -ggdb -Wall -Wno-sign-compare -Wno-unused-but-set-variable -Werror=return-type>
# $<$<VERSION_GREATER:$<CXX_COMPILER_VERSION>,5.0>:-Wnull-dereference>
$<${_cxx_gnu_rwdbg}:-Werror=return-type>
$<${_cxx_gnu_rel}:-Werror=return-type>
$<${_cxx_intel_dbg}:-O0 -traceback -Wcheck>
$<${_cxx_intel_rwdbg}:-ip -qopt-report=5 -qopt-report-phase=vec>
$<${_cxx_intel_rel}:-ip -qopt-report=5 -qopt-report-phase=vec>
$<${_cxx_pgi_dbg}:-O0 -Mbounds>
$<${_cxx_pgi_rwdbg}:-gopt -fast>
$<${_cxx_pgi_rel}:-gopt -fast>
$<${_cxx_cray_dbg}:-O0>
$<${_cxx_cray_rwdbg}:>
$<${_cxx_cray_rel}:>
$<${_cxx_clang_dbg}:-O0 -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable>
$<${_cxx_clang_rwdbg}:>
$<${_cxx_clang_rel}:>
$<${_cxx_appleclang_dbg}:-O0 -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable>
$<${_cxx_appleclang_rwdbg}:>
$<${_cxx_appleclang_rel}:>
$<${_cxx_intelllvm_dbg}:-O0 -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable>
$<${_cxx_intelllvm_rwdbg}:-gline-tables-only -fdebug-info-for-profiling> # recommended by Intel VTune
$<${_cxx_intelllvm_rel}:>
)

Then, with Intel's classic compilers, configure AMReX with -DCMAKE_BUILD_TYPE=Debug and note the C++ flags listed under "AMReX configuration summary", before and after the changes suggested here. The gist is Intel as a compiler id was matching IntelLLVM (and Clang was also matching AppleClang though the flags in that case are the same, so it's harder to tell).
EDIT: this actually only affects what's printed in the summary, the flags that are actually used are already correct!

The proposed changes:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • include documentation in the code and/or rst files, if appropriate

@nmnobre nmnobre mentioned this pull request Dec 18, 2024
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.

CMake build system
1 participant