Skip to content

cmake: remove HPX_WITH_CXX20_SOURCE_LOCATION feature test#6996

Merged
hkaiser merged 8 commits intoTheHPXProject:masterfrom
GitMasterJatin:removing-HPX_WITH_CXX20_SOURCE_LOCATION
Mar 16, 2026
Merged

cmake: remove HPX_WITH_CXX20_SOURCE_LOCATION feature test#6996
hkaiser merged 8 commits intoTheHPXProject:masterfrom
GitMasterJatin:removing-HPX_WITH_CXX20_SOURCE_LOCATION

Conversation

@GitMasterJatin
Copy link
Copy Markdown
Contributor

@GitMasterJatin GitMasterJatin commented Mar 11, 2026

C++20 is now the minimum required standard for HPX, so std::source_location is always available. Remove the cmake feature detection test, the compile-test source file, and the conditional #ifdef guards.

hpx::source_location now unconditionally aliases std::source_location, and HPX_CURRENT_SOURCE_LOCATION() unconditionally expands to std::source_location::current().

Relates to #6941

C++20 is now the minimum required standard for HPX, so
std::source_location is always available. Remove the cmake feature
detection test, the compile-test source file, and the conditional
#ifdef guards.

hpx::source_location now unconditionally aliases std::source_location,
and HPX_CURRENT_SOURCE_LOCATION() unconditionally expands to
std::source_location::current().

Relates to TheHPXProject#6941

Signed-off-by: GitMasterJatin <jatinnsharmaa7@gmail.com>
@GitMasterJatin GitMasterJatin requested a review from hkaiser as a code owner March 11, 2026 05:24
@StellarBot
Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

hkaiser
hkaiser previously approved these changes Mar 11, 2026
Copy link
Copy Markdown
Contributor

@hkaiser hkaiser left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@hkaiser hkaiser added this to the 2.0.0 milestone Mar 11, 2026
@hkaiser hkaiser mentioned this pull request Mar 11, 2026
14 tasks
@GitMasterJatin
Copy link
Copy Markdown
Contributor Author

This branch has no conflicts with the base branch.

Comment thread cmake/templates/std_headers.hpp.in Outdated
GitMasterJatin and others added 3 commits March 15, 2026 15:43
The previous commit accidentally:
1. Stripped all preprocessor indentation (# include → #include inside
   conditional blocks), breaking build consistency and HPX coding style.
2. Added a spurious space in '@cxx_standard_headers @', corrupting the
   CMake template substitution which caused build failures.

Restore the file to its original indentation style (as on master) while
keeping the only intentional change: removing the now-unnecessary
HPX_HAVE_CXX20_SOURCE_LOCATION guard and unconditionally including
<source_location> since C++20 is the minimum required standard.

Fixes the build breakage flagged by hkaiser in PR review.

Signed-off-by: Jatin Sharma <jatinnsharmaa7@gmail.com>
Restore the original preprocessor indentation style (using '# include'
with indentation after '#' for nested conditionals) which was
accidentally stripped in a previous commit, breaking the builds.

Also fixes '@cxx_standard_headers @' back to '@cxx_standard_headers@'
(spurious trailing space broke CMake template substitution).

The only intentional change is kept: unconditionally include
<source_location> since C++20 is now the minimum standard.

Signed-off-by: Jatin Sharma <jatinnsharmaa7@gmail.com>
Copy link
Copy Markdown
Contributor

@hkaiser hkaiser left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@hkaiser hkaiser merged commit 4e0715f into TheHPXProject:master Mar 16, 2026
108 of 113 checks passed
@GitMasterJatin GitMasterJatin deleted the removing-HPX_WITH_CXX20_SOURCE_LOCATION branch March 18, 2026 09:16
ArivoliR pushed a commit to ArivoliR/hpx that referenced this pull request Mar 29, 2026
…X_WITH_CXX20_SOURCE_LOCATION

cmake: remove HPX_WITH_CXX20_SOURCE_LOCATION feature test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants