| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
… version not found in mapping
There was a problem hiding this comment.
Adds/reshapes the project’s test/build setup to better support C++23 modules and GoogleTest under both xmake and CMake/CTest, including a version→UUID mapping for import std.
Changes:
Copilot reviewed 6 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file| File | Description |
|---|---|
| tests/xmake.lua | Replaces inline test target with includes("main"). |
| tests/main/xmake.lua | New xmake test target definition under tests/main. |
| tests/main/main.cpp | New GTest test and custom main() for running tests. |
| tests/main/CMakeLists.txt | New CMake test executable and CTest registration. |
| tests/CMakeLists.txt | New GTest find-or-fetch logic and adds tests/main. |
| CMakeLists.txt | Adds CMake/compiler version logic and CTest-based test inclusion. |
| cmake_import_std_uuids.json | Adds mapping for CMAKE_EXPERIMENTAL_CXX_IMPORT_STD UUID by CMake version. |
| .gitignore | Ignores IDE/cache directories. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Sorry, something went wrong.
| if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${COMPILER_MSVC_VERSION_MINIMUM}) | ||
| message(FATAL_ERROR | ||
| "MSVC version too old for C++ Modules.\n" | ||
| "MSVC version: ${CMAKE_CXX_COMPILER_VERSION} (>= ${COMPILER_MSVC_VERSION_MINIMUM} X)" | ||
| ) | ||
| else() | ||
| message(STATUS "MSVC version: ${CMAKE_CXX_COMPILER_VERSION} (>= ${COMPILER_MSVC_VERSION_MINIMUM} ✓)") |
| set(TEST_EXECUTABLE_NAME main_tests) | ||
| add_executable(${TEST_EXECUTABLE_NAME} ${TESTS_SRC}) | ||
|
|
||
| target_link_libraries(${TEST_EXECUTABLE_NAME} PRIVATE GTest::gtest GTest::gmock GTest::gmock_main GTest::gtest_main) |
| # Compiler version check | ||
| if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | ||
| if (WIN32) | ||
| message(FATAL_ERROR | ||
| "Detected the use of MinGW GCC compiler on Windows.\n" | ||
| "MinGW GCC has serious compatibility issues with C++23 modules (import std).\n" | ||
| "Please switch to Clang (such as llvm-mingw) or MSVC for compilation." | ||
| ) | ||
| endif () | ||
| set(COMPILER_GCC_VERSION_MINIMUM 14.0) | ||
| if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${COMPILER_GCC_VERSION_MINIMUM}) | ||
| message(FATAL_ERROR |
| if(NOT TARGET GTest::gtest) | ||
| find_package(GTest QUIET CONFIG) | ||
| endif() | ||
|
|
||
| if(NOT TARGET GTest::gtest) |
| Back | FazBrowse Home | New Git URL |
No description provided.