Skip to content

Commit 2492574

Browse files
committed
Add override, update ChangeLog
1 parent 0bb0994 commit 2492574

File tree

3 files changed

+30
-14
lines changed

3 files changed

+30
-14
lines changed

ChangeLog

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
2025-11-24 Dirk Eddelbuettel <edd@debian.org>
2+
3+
* inst/include/Rcpp/r/check_r_headers.h: Add RCPP_NO_R_HEADERS_CHECK
4+
override to skip new check
5+
6+
2025-11-23 Dirk Eddelbuettel <edd@debian.org>
7+
8+
* inst/include/Rcpp/r/check_r_headers.h: New header to check if R.h
9+
or related R headers were installed first
10+
* inst/include/RcppCommon.h: Call new header as first thing
11+
112
2025-11-04 Dirk Eddelbuettel <edd@debian.org>
213

314
* .github/workflows/macos.yaml (jobs): Roll macos-13 to macos-14

inst/include/Rcpp/r/check_r_headers.h

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,25 @@
2020
#ifndef RCPP__CHECK__R__HEADERS__H
2121
#define RCPP__CHECK__R__HEADERS__H
2222

23-
#if defined(R_R_H) & defined(USING_R)
24-
#pragma message "R.h has been included before any Rcpp headers. This can lead to hard-to-debug errors, and is generally not necessary. See https://github.com/RcppCore/Rcpp/issues/1410"
25-
#endif
23+
// Allow an escape hatch
24+
#if !defined(RCPP_NO_R_HEADERS_CHECK)
2625

27-
#if defined(RINTERFACE_H_)
28-
#pragma message "Rinterface.h has been included before any Rcpp headers. This can lead to hard-to-debug errors, and is not necessary. See https://github.com/RcppCore/Rcpp/issues/1410"
29-
#endif
26+
#if defined(R_R_H) & defined(USING_R)
27+
#pragma message "R.h has been included before any Rcpp headers. This can lead to hard-to-debug errors, and is generally not necessary. See https://github.com/RcppCore/Rcpp/issues/1410"
28+
#endif
3029

31-
#if defined(R_INTERNALS_H_)
32-
#pragma message "Rinternals.h has been included before any Rcpp headers. This can lead to hard-to-debug errors, and is generally not necessary. See https://github.com/RcppCore/Rcpp/issues/1410"
33-
#endif
30+
#if defined(RINTERFACE_H_)
31+
#pragma message "Rinterface.h has been included before any Rcpp headers. This can lead to hard-to-debug errors, and is not necessary. See https://github.com/RcppCore/Rcpp/issues/1410"
32+
#endif
3433

35-
#if defined(R_DEFINES_H_)
36-
#pragma message "Rdefines.h has been included before any Rcpp headers. This can lead to hard-to-debug errors, and is generally not necessary. See https://github.com/RcppCore/Rcpp/issues/1410"
37-
#endif
34+
#if defined(R_INTERNALS_H_)
35+
#pragma message "Rinternals.h has been included before any Rcpp headers. This can lead to hard-to-debug errors, and is generally not necessary. See https://github.com/RcppCore/Rcpp/issues/1410"
36+
#endif
3837

39-
#endif
38+
#if defined(R_DEFINES_H_)
39+
#pragma message "Rdefines.h has been included before any Rcpp headers. This can lead to hard-to-debug errors, and is generally not necessary. See https://github.com/RcppCore/Rcpp/issues/1410"
40+
#endif
41+
42+
#endif // escape hatch '!defined(RCPP_NO_R_HEADERS_CHECK)'
43+
44+
#endif // header guard

inst/include/RcppCommon.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//
55
// Copyright (C) 2008 - 2009 Dirk Eddelbuettel
66
// Copyright (C) 2009 - 2020 Dirk Eddelbuettel and Romain Francois
7-
// Copyright (C) 2021 Dirk Eddelbuettel, Romain Francois and Iñaki Ucar
7+
// Copyright (C) 2021 - 2025 Dirk Eddelbuettel, Romain Francois and Iñaki Ucar
88
//
99
// This file is part of Rcpp.
1010
//

0 commit comments

Comments
 (0)