`other.test_cmake_cxx_import_std` fails on CMake 3.30–4.0.2 due to missing `CMAKE_EXPERIMENTAL_CXX_IMPORT_STD` UUIDs
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 85/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- cmake, cpp
- Ambito
- build-system, testing
Direzione di ricerca
Leggi test/cmake/cxx_import_std/CMakeLists.txt e confronta i suoi rami delle versioni di CMake con gli intervalli di versioni nell’issue. Aggiorna la selezione sperimentale dell’UUID per CMake 3.30–3.31 e 4.0.0–4.0.2, quindi esegui other.test_cmake_cxx_import_std da test/test_other.py con queste versioni di CMake. Il lavoro è completato quando il test viene configurato e compilato correttamente con le versioni interessate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I found this when testing on a VM with a newer version of CMake than what we are currently testing:
Description
cmake/Modules/Platform/Emscripten.cmake supports CMAKE_CXX_MODULE_STD on CMake >= 3.30 (added in #27065), and other.test_cmake_cxx_import_std in test/test_other.py runs whenever CMake >= (3, 30) is detected.
However, test/cmake/cxx_import_std/CMakeLists.txt only sets CMAKE_EXPERIMENTAL_CXX_IMPORT_STD for CMake >= 4.3.0 and 4.0.3..4.2.x:
cmake_minimum_required(VERSION 3.30)
set(CMAKE_CXX_MODULE_STD ON)
if(CMAKE_VERSION VERSION_GREATER_EQUAL 4.3.0)
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD 451f2fe2-a8a2-47c3-bc32-94786d8fc91b)
else()
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD d0edc3af-4c50-42ea-a356-e2862fe7a444)
endif()
Because CircleCI's Linux Docker image (emscripten/emscripten-ci:jammy.v2) has CMake 3.22.1 and test_cmake_cxx_import_std is not marked @crossplatform, the test is currently skipped on CircleCI. On environments with CMake 3.30–3.31 (such as Ubuntu 24.04 / GitHub Actions ubuntu-latest with CMake 3.31.6) or CMake 4.0.0–4.0.2, CMake rejects the UUID and disables import std:
CMake Warning (dev) at /usr/share/cmake-3.31/Modules/Compiler/CMakeCommonCompilerMacros.cmake:248 (message):
CMAKE_EXPERIMENTAL_CXX_IMPORT_STD is set to incorrect value
"d0edc3af-4c50-42ea-a356-e2862fe7a444". See `Help/dev/experimental.rst`
for CMake's C++ `import std` support.
...
CMake Error in CMakeLists.txt:
The "CXX_MODULE_STD" property on the target "cxx_import_std23" requires
that the "__cmake_cxx23" target exist, but it was not provided by the
toolchain.
...
test/cmake/cxx_import_std/main.cpp:1:8: fatal error: module 'std' not found
1 | import std;
| ~~~~~~~^~~
Proposed Fix
Update test/cmake/cxx_import_std/CMakeLists.txt to include the experimental gate UUIDs for CMake 3.30.0–3.31.x (0e5b6991-d74f-4b3d-a41c-cf096e0b2508) and CMake 4.0.0–4.0.2 (a9e1cf81-9932-4810-974b-6eccaf14e457):
if(CMAKE_VERSION VERSION_GREATER_EQUAL 4.3.0)
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD 451f2fe2-a8a2-47c3-bc32-94786d8fc91b)
elseif(CMAKE_VERSION VERSION_GREATER_EQUAL 4.0.3)
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD d0edc3af-4c50-42ea-a356-e2862fe7a444)
elseif(CMAKE_VERSION VERSION_GREATER_EQUAL 4.0.0)
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD a9e1cf81-9932-4810-974b-6eccaf14e457)
else()
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD 0e5b6991-d74f-4b3d-a41c-cf096e0b2508)
endif()
- Lingua principale
- C++
- Stelle
- 27.8k
- Fork
- 3.6k
- Merge medio
- 1g 3h
- PR unite (30g)
- 179
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di emscripten-core/emscripten
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
emscripten-core/emscripten#27994 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
LEGACY_GL_EMULATION: generated fixed-function fragment shaders use mediump — fp16 overflow where mediump is half precisionForse già presa @TheTomBritton l’ha presa 13 giorni fa. ApertaDesktop OpenGL emulation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
emscripten-core/emscripten#27948 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
emscripten-core/emscripten#27906 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
run_python, run_python_compiler could readlink -fForse già presa @kapouer l’ha presa 128 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
emscripten-core/emscripten#27211 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
emscripten_fetch_unpack_response_headers returns header values with leading and trailing whitespaceAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
emscripten-core/emscripten#27114 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di emscripten-core/emscripten
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
mw00/project-maya#877 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
llvm/offload-test-suite#1703 ·
I maintainer di solito rispondono entro 1 giorno
-
test(tools): test_invite_answer_wiring scans nothing in a checkout whose path contains tests/Apertabacklog bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
EchoTools/nevr-runtime#2154 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
BGI-shenzhen/PopLDdecay#25 ·