GGitHubAdd visionOS support (#682)
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Breaking: Replace dashes with underscores in lib names | 2 年前 | |
tests: Add test for installing cbindgen header | 1 年前 | |
Fix: Set working directory for `cargo metadata` and `cargo clean` to ensure config discovery (#646) * tests: Add `cargo_config_discovery` test * fix: set working directory for cargo to ensure config discovery Set `WORKING_DIRECTORY` for all `cargo` invocations to the manifest's directory, matching the existing behavior for `cargo build`. This ensures that Cargo properly discovers configuration files like `.cargo/config.toml` and `toolchain.toml` by walking upward from the manifest directory, rather than from CMake's current working directory. Updated comments to clarify that Cargo searches for configuration files by walking upward from the current directory. * test fix: build executable for `cargo_config_discovery_run_cargo_config_discovery`. * test fix: adjust registry alias / dependency for older toolchain * test fix: ensure `cargo-clean` waits until `*_run_${exe}` completes. * test fix: shorten name to `config_discovery` to avoid Windows path limit | 10 个月前 | |
Make `corrosion_install` install header files and export configurations (#544) * Make corrosion_install support include directories Supports directories added with `target_include_directories` like normal. There is a slight oddity. Because of how install(DIRECTORY) works, we can't put the include directory inside `${CMAKE_INSTALL_PREFIX}/include`, since that would create `${CMAKE_INSTALL_PREFIX}/include/<include dir name>`. Instead we copy directly to the CMAKE_INSTALL_PREFIX, and then use whatever name the include directory had (hopefully just `include`). This means that when installing the path to include files will be -- Installing: /tmp/install/./include -- Installing: /tmp/install/./include/is_odd -- Installing: /tmp/install/./include/is_odd/is_odd.h Instead of just -- Installing: /tmp/install/include -- Installing: /tmp/install/include/is_odd -- Installing: /tmp/install/include/is_odd/is_odd.h * Add special case for FILE_SETS in corrosion_install This adds better `install` integration for targets with headers defined through target_sources. The PUBLIC_HEADER option can now be used to change the DIRECTORY. * Add EXPORT to corrosion_install This does an install(TARGETS EXPORT) and creates a file at ${CMAKE_BINARY_DIR}/corrosion/<export-name>TargetsCorrosion.cmake that contains the *-static and *-shared targets used by the main target. The examples use RustLib instead of ${PROJECT_NAME} for visual clarity. * Add implib support to corrosion_install exports * Update docs for corrosion_install Co-authored-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com> * Update corrosion_install to deliberately unset EXPORT_NAME * Add strings around paths in corrosion_install export file * Make corrosion_install only install HEADERS file set * Move corrosion_install example into usages.md * Add header file to install_lib test This is not actually part of the test. --------- Co-authored-by: Gtker <git@gtker.com> Co-authored-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com> | 2 年前 | |
tests: Add a build-script Buildscripts also need to be linked, so adding a build script could expose some issues. | 3 年前 | |
Support CRATE_TYPES argument for corrosion_import_crate | 3 年前 | |
Breaking: Replace dashes with underscores in lib names | 2 年前 | |
fix: compiler env vars for cc-rs when using custom target triple (#633) * fix: compiler env vars for cc-rs when using custom target triple * Add test for custom target triples Notes: - The custom target triple filename should use dashes, and be named like the target-triple of the c compiler toolchain. --------- Co-authored-by: Jonathan Schwender <schwenderjonathan@gmail.com> | 1 年前 | |
cxxbridge: Circular link rebase (#640) * Add test case for exported impls * cxx libraries mutually depend on rust libs. Test update to match * Refactor test for circular linking to show how it can work for older CMakes * Add exported impl test back in * Exclude WIN32 from exported impls for now * Check both CMake version and RESCAN flag | 11 个月前 | |
Breaking: Replace dashes with underscores in lib names | 2 年前 | |
Breaking: Replace dashes with underscores in lib names | 2 年前 | |
Disable rustup_proxy test if rustup is not installed The test only makes sense if rustc / cargo are behind a rustup proxy. If rustup is not installed, we can just disable the test. | 1 年前 | |
tests: Remove unused parameters from gensource test The removed parameters where not valid, and did not do anything. | 3 年前 | |
tests: Fix hostbuild tests not running when cross-compiling | 2 年前 | |
Fix multitarget test for Windows MSVC with clang Using -fPIE directly causes an error in the combination mentioned above. ``` [1/10] Building CXX object CMakeFiles/cpp-lib4.dir/lib.cpp.obj FAILED: CMakeFiles/cpp-lib4.dir/lib.cpp.obj C:\PROGRA~1\LLVM\bin\CLANG_~1.EXE -g -Xclang -gcodeview -O0 -D_DEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrtd -fPIE -MD -MT CMakeFiles/cpp-lib4.dir/lib.cpp.obj -MF CMakeFiles\cpp-lib4.dir\lib.cpp.obj.d -o CMakeFiles/cpp-lib4.dir/lib.cpp.obj -c D:/a/corrosion/corrosion/test/multitarget/multitarget/lib.cpp CLANG_~1: error: unsupported option '-fPIE' for target 'x86_64-pc-windows-msvc' ``` Use the CMake target property instead of adding a compile option. We probably still want to ensure that our C libraries are PIC, since Rust executables / shared libraries are PIE/PIC by default. | 3 年前 | |
Refactor Corrosion tests to use ctest Use ctest and CMake script mode to drive the corrosion tests. This has the advantage that we can easily add assertions on the stdout output of the corrosion configure step, e.g. causing the test to fail if a Warning occurs when running Corrosion. Additionally, we can now also easily run the executables and verify if they are working, which the tests previously did not check. | 3 年前 | |
CI: Add compile testing for iOS (simulator) | 10 个月前 | |
Add test for OVERRIDE_CRATE_TYPE | 2 年前 | |
Add visionOS support (#682) Mostly copy-pasted iOS code. Only tested as part of custom AccessKit build for Godot. --------- Co-authored-by: Jonathan Schwender <schwenderjonathan@gmail.com> | 5 天前 | |
Breaking: Replace dashes with underscores in lib names | 2 年前 | |
Breaking: Replace dashes with underscores in lib names | 2 年前 | |
Fix detecting required libraries with cargo 1.71 and workspaces `cargo new` now seems to write `version.workspace` into the Cargo.toml, which we don't want, since our crate should not belong to the workspace. Instead of relying on the generated Cargo.toml we overwrite the generated Cargo.toml with our own. This should prevent similar future issues. | 3 年前 | |
CI: Add compile testing for iOS (simulator) | 10 个月前 | |
CI: Add compile testing for iOS (simulator) | 10 个月前 | |
Refactor Corrosion tests to use ctest Use ctest and CMake script mode to drive the corrosion tests. This has the advantage that we can easily add assertions on the stdout output of the corrosion configure step, e.g. causing the test to fail if a Warning occurs when running Corrosion. Additionally, we can now also easily run the executables and verify if they are working, which the tests previously did not check. | 3 年前 | |
Improve debug output of TestFileExists | 1 年前 |
Corrosion Tests
Corrosions tests are run via ctest. The tests themselves utilize CMake script mode
to configure and build a test project, which allows for great flexibility.
Using ctest properties such as PASS_REGULAR_EXPRESSION or FAIL_REGULAR_EXPRESSION
can be used to confirm that built executable targets run as expected, but can also
be used to fail tests if Corrosion warnings appear in the configure output.