Summary
detect_MADNESS_configuration() fails to configure against any MADNESS newer than
48dc6494b
(Aug 21 2026). It copies MADworld's INTERFACE_INCLUDE_DIRECTORIES verbatim into
CMAKE_REQUIRED_INCLUDES and then runs CHECK_CXX_SOURCE_COMPILES, but that property now
contains an unevaluated generator expression naming a MADNESS target. try_compile()
generates a standalone project in which no MADNESS target exists, so the expression is a
hard error there rather than an include path.
This does not affect the currently pinned TA_TRACKED_MADNESS_TAG (666765ca6, May 21
2026), which predates the MADNESS change — it bites anyone pointing
FETCHCONTENT_SOURCE_DIR_MADNESS at a current MADNESS checkout, and it will block the next
pin bump.
Reproducer
cmake -S . -B build \
-DFETCHCONTENT_SOURCE_DIR_MADNESS=<a MADNESS checkout at or after 48dc6494b> \
...
-- Performing Test MADNESS_HAS_TBB
CMake Error at build/CMakeFiles/CMakeScratch/TryCompile-SE5mo9/CMakeLists.txt:11 (include_directories):
Error evaluating generator expression:
$<TARGET_PROPERTY:MADmisc,INTERFACE_INCLUDE_DIRECTORIES>
Target "MADmisc" not found.
CMake Error at .../Internal/CheckSourceCompiles.cmake:104 (try_compile):
Failed to generate test project build system.
Call Stack (most recent call first):
.../CheckCXXSourceCompiles.cmake:58 (cmake_check_source_compiles)
cmake/modules/DetectMADNESSConfig.cmake:27 (CHECK_CXX_SOURCE_COMPILES)
CMakeLists.txt:347 (detect_MADNESS_configuration)
-- Configuring incomplete, errors occurred!
Reproduces on both MADNESS_TASK_BACKEND=Pthreads and PaRSEC.
Cause
MADNESS 48dc6494b ("misc: make it a leaf component so world can depend on it") inverted
the previously cyclic misc/world edge:
-add_mad_library(world MADWORLD_SOURCES MADWORLD_HEADERS "common;${ELEMENTAL_PACKAGE_NAME}" "madness/world")
+add_mad_library(world MADWORLD_SOURCES MADWORLD_HEADERS "misc;common;${ELEMENTAL_PACKAGE_NAME}" "madness/world")
add_mad_library propagates a dependency's include dirs as an unevaluated generator
expression (MADNESS cmake/modules/AddMADLibrary.cmake):
if(TARGET ${deptargetname})
target_include_directories(${targetname} PUBLIC
$<TARGET_PROPERTY:${deptargetname},INTERFACE_INCLUDE_DIRECTORIES>)
so MADworld's INTERFACE_INCLUDE_DIRECTORIES now literally contains the string
$<TARGET_PROPERTY:MADmisc,INTERFACE_INCLUDE_DIRECTORIES>.
That injection is guarded by if(TARGET MAD${_dep}), and misc is the first MAD*
library target world has ever depended on — common has no MADcommon target
anywhere, so it was silently skipped. That is why this only surfaces now.
Note the MADNESS change is not itself at fault: it explicitly handles
MADNESS_BUILD_MADWORLD_ONLY=ON ("because MADworld links it,
MADNESS_BUILD_MADWORLD_ONLY=ON now configures, builds and installs MADmisc"), and
MADmisc is defined in TA's configuration. The failure is purely that a generator
expression cannot survive into a try_compile sub-project.
Suggested fix
TA already carries an ad-hoc version of this workaround in the same macro — an
if (TARGET El) branch that strips El-matching entries, i.e. a one-off patch for exactly
this hazard. Generalize it: drop every entry containing $< before it reaches
CMAKE_REQUIRED_INCLUDES. A generator expression is never a usable include path in a
try_compile, and the plain directories that remain are what the madness/config.h probe
actually needs.
This also subsumes the El special case (those entries are genexes too) and is more
precise than a substring match on El, which would drop a legitimate path containing
those letters.
Summary
detect_MADNESS_configuration()fails to configure against any MADNESS newer than48dc6494b(Aug 21 2026). It copies
MADworld'sINTERFACE_INCLUDE_DIRECTORIESverbatim intoCMAKE_REQUIRED_INCLUDESand then runsCHECK_CXX_SOURCE_COMPILES, but that property nowcontains an unevaluated generator expression naming a MADNESS target.
try_compile()generates a standalone project in which no MADNESS target exists, so the expression is a
hard error there rather than an include path.
This does not affect the currently pinned
TA_TRACKED_MADNESS_TAG(666765ca6, May 212026), which predates the MADNESS change — it bites anyone pointing
FETCHCONTENT_SOURCE_DIR_MADNESSat a current MADNESS checkout, and it will block the nextpin bump.
Reproducer
Reproduces on both
MADNESS_TASK_BACKEND=PthreadsandPaRSEC.Cause
MADNESS
48dc6494b("misc: make it a leaf component so world can depend on it") invertedthe previously cyclic
misc/worldedge:add_mad_librarypropagates a dependency's include dirs as an unevaluated generatorexpression (MADNESS
cmake/modules/AddMADLibrary.cmake):so
MADworld'sINTERFACE_INCLUDE_DIRECTORIESnow literally contains the string$<TARGET_PROPERTY:MADmisc,INTERFACE_INCLUDE_DIRECTORIES>.That injection is guarded by
if(TARGET MAD${_dep}), andmiscis the firstMAD*library target
worldhas ever depended on —commonhas noMADcommontargetanywhere, so it was silently skipped. That is why this only surfaces now.
Note the MADNESS change is not itself at fault: it explicitly handles
MADNESS_BUILD_MADWORLD_ONLY=ON("because MADworld links it,MADNESS_BUILD_MADWORLD_ONLY=ONnow configures, builds and installs MADmisc"), andMADmiscis defined in TA's configuration. The failure is purely that a generatorexpression cannot survive into a
try_compilesub-project.Suggested fix
TA already carries an ad-hoc version of this workaround in the same macro — an
if (TARGET El)branch that stripsEl-matching entries, i.e. a one-off patch for exactlythis hazard. Generalize it: drop every entry containing
$<before it reachesCMAKE_REQUIRED_INCLUDES. A generator expression is never a usable include path in atry_compile, and the plain directories that remain are what themadness/config.hprobeactually needs.
This also subsumes the
Elspecial case (those entries are genexes too) and is moreprecise than a substring match on
El, which would drop a legitimate path containingthose letters.