Skip to content

Commit bb84a00

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 1554110 + e4613ab commit bb84a00

38 files changed

Lines changed: 1624 additions & 347 deletions

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
-DCMAKE_PREFIX_PATH="/usr/local/opt/bison;/usr/local/opt/scalapack;/usr/local/opt/boost"
4040
-DTA_ASSERT_POLICY=TA_ASSERT_THROW
4141
-DTA_SCALAPACK=ON
42+
-DTA_WERROR=ON
4243
4344
steps:
4445
- uses: actions/checkout@v4

.gitlab-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ variables:
1212
TA_CONFIG : >
1313
CMAKE_BUILD_TYPE=${BUILD_TYPE}
1414
TA_ASSERT_POLICY=TA_ASSERT_THROW
15+
TA_WERROR=ON
1516
TA_UT_CTEST_TIMEOUT=3000
1617
${TA_PYTHON}
1718
${TA_CUDA}

AGENTS.md

Lines changed: 687 additions & 0 deletions
Large diffs are not rendered by default.

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AGENTS.md

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ add_feature_info(TENSOR_ASSERT_NO_MUTABLE_OPS_WHILE_SHARED TA_TENSOR_ASSERT_NO_M
149149

150150
option(TA_EXPERT "TiledArray Expert mode: disables automatically downloading or building dependencies" OFF)
151151

152+
redefaultable_option(TA_WERROR "Treat compiler warnings as errors when compiling TiledArray's own translation units (does not propagate to consumers of installed TiledArray targets)" OFF)
153+
add_feature_info(WERROR TA_WERROR "Treat compiler warnings as errors on TiledArray's own translation units")
154+
include(TiledArrayWarnings)
155+
152156
option(TA_SIGNED_1INDEX_TYPE "Enables the use of signed 1-index coordinate type (OFF in 1.0.0-alpha.2 and older)" ON)
153157
add_feature_info(SIGNED_1INDEX_TYPE TA_SIGNED_1INDEX_TYPE "Use of signed 1-index coordinate type in TiledArray")
154158

INSTALL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,7 @@ support may be added.
428428
* `BUILD_TESTING` -- Set of `OFF` to disable building unit tests. The default is `ON`.
429429
* `TA_TRACE_TASKS` -- Set to `ON` to enable tracing of MADNESS tasks using custom task tracer. Note that standard profilers/tracers are generally useless (except in the trivial cases) with MADWorld-based programs since the submission context of tasks is not captured by standard tracing tools; this makes it impossible in a nontrivial program to attribute tasks to source code. WARNING: task tracing his will greatly increase the memory requirements. [Default=OFF].
430430
* `TA_TTG` -- Set to `ON` to find or fetch the TTG library. [Default=OFF].
431+
* `TA_WERROR` -- Set to `ON` to treat compiler warnings as errors when compiling TiledArray's own translation units (the `tiledarray` library and in-tree tests/examples). Also implies `MADNESS_WERROR=ON` for the MADworld translation units built as part of TA's FetchContent tree. Does **not** propagate to consumers of the installed `tiledarray` target (i.e. `find_package(tiledarray)` users do not inherit `-Werror`). Honored on GNU/Clang/AppleClang/IntelLLVM. [Default=OFF].
431432
* `TA_SIGNED_1INDEX_TYPE` -- Set to `OFF` to use unsigned 1-index coordinate type (default for TiledArray 1.0.0-alpha.2 and older). The default is `ON`, which enables the use of negative indices in coordinates.
432433
* `TA_MAX_SOO_RANK_METADATA` -- Specifies the maximum rank for which to use Small Object Optimization (hence, avoid the use of the heap) for metadata. The default is `8`.
433434
* `TA_TENSOR_MEM_PROFILE` -- Set to `ON` to profile host memory allocations used by TA::Tensor. This causes the use of Umpire for host memory allocation. This also enables additional tracing facilities provided by Umpire; these can be controlled via [environment variable `UMPIRE_LOG_LEVEL`](https://umpire.readthedocs.io/en/develop/sphinx/features/logging_and_replay.html), but note that the default is to log Umpire info into a file rather than stdout.

cmake/modules/AddTAExecutable.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ macro(add_ta_executable _name _source_files _libs)
22

33
add_executable(${_name} EXCLUDE_FROM_ALL "${_source_files}")
44
target_link_libraries(${_name} PRIVATE "${_libs}")
5+
target_link_libraries(${_name} PRIVATE tiledarray_internal_warnings)
56

67
endmacro()

cmake/modules/FindOrFetchBTAS.cmake

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,20 @@ endif(NOT TARGET BTAS::BTAS)
7575
if (NOT TARGET BTAS::BTAS)
7676
message(FATAL_ERROR "FindOrFetchBTAS could not make BTAS::BTAS target available")
7777
endif(NOT TARGET BTAS::BTAS)
78+
79+
# Treat BTAS headers as system: header-only library, no include-order
80+
# risk against TA's headers, and BTAS upstream trips warnings TA itself
81+
# can't fix (e.g. btas/generic/converge_class.h -Wreturn-type on gcc).
82+
# Carved out specifically here despite the top-level
83+
# CMAKE_NO_SYSTEM_FROM_IMPORTED=TRUE.
84+
get_target_property(_btas_aliased BTAS::BTAS ALIASED_TARGET)
85+
if (NOT _btas_aliased)
86+
set(_btas_aliased BTAS::BTAS)
87+
endif()
88+
get_target_property(_btas_inc ${_btas_aliased} INTERFACE_INCLUDE_DIRECTORIES)
89+
if (_btas_inc)
90+
set_target_properties(${_btas_aliased} PROPERTIES
91+
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_btas_inc}")
92+
endif()
93+
unset(_btas_inc)
94+
unset(_btas_aliased)

cmake/modules/FindOrFetchMADWorld.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ if (NOT TARGET MADworld)
2222
endif()
2323
endif()
2424
set(MPI_THREAD "multiple" CACHE INTERNAL "MADNESS requires MPI_THREAD_MULTIPLE")
25+
# TA_WERROR=ON implies MADNESS_WERROR=ON: warnings-as-errors should cover
26+
# the MADNESS translation units built as part of TA's FetchContent tree.
27+
# (Requires a MADNESS pin that includes the MADNESS_WERROR option; otherwise
28+
# this cache variable is harmlessly ignored.)
29+
if (TA_WERROR)
30+
set(MADNESS_WERROR ON CACHE BOOL "Treat compiler warnings as errors when compiling MADNESS's own translation units" FORCE)
31+
endif()
2532
set(MADNESS_ASSUMES_ASLR_DISABLED ${TA_ASSUMES_ASLR_DISABLED} CACHE BOOL "Whether MADNESS assumes ASLR to be disabled")
2633
set(MPI_CXX_SKIP_MPICXX ON CACHE BOOL "Whether to disable search for C++ MPI-2 bindings")
2734
set(DISABLE_WORLD_GET_DEFAULT ON CACHE INTERNAL "Whether to disable madness::World::get_default()")

cmake/modules/FindOrFetchRangeV3.cmake

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,23 @@ endif(NOT TARGET range-v3::range-v3)
3131
if (NOT TARGET range-v3::range-v3)
3232
message(FATAL_ERROR "FindOrFetchRangeV3 could not make range-v3::range-v3 target available")
3333
endif(NOT TARGET range-v3::range-v3)
34+
35+
# Treat range-v3 headers as system: range-v3 is header-only with no
36+
# ordering risk against TA's headers, and it self-triggers
37+
# -Wdeprecated-declarations (e.g. ranges::compressed_tuple used inside
38+
# compressed_pair.hpp). The blanket CMAKE_NO_SYSTEM_FROM_IMPORTED=TRUE
39+
# at the top-level avoids -isystem for general imported targets due to
40+
# include-dir ordering; carve out range-v3 specifically here.
41+
# range-v3::range-v3 is an ALIAS — resolve to the underlying target before
42+
# touching properties.
43+
get_target_property(_rv3_aliased range-v3::range-v3 ALIASED_TARGET)
44+
if (NOT _rv3_aliased)
45+
set(_rv3_aliased range-v3::range-v3)
46+
endif()
47+
get_target_property(_rv3_inc ${_rv3_aliased} INTERFACE_INCLUDE_DIRECTORIES)
48+
if (_rv3_inc)
49+
set_target_properties(${_rv3_aliased} PROPERTIES
50+
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_rv3_inc}")
51+
endif()
52+
unset(_rv3_inc)
53+
unset(_rv3_aliased)

0 commit comments

Comments
 (0)