tools/corrosion/test/hostbuild/CMakeLists.txt
author unC0Rr
Wed, 28 Aug 2024 15:31:51 +0200
branchtransitional_engine
changeset 16021 6a3dc15b78b9
permissions -rw-r--r--
Add corrosion as a subdirectory, CMake fixes
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16021
6a3dc15b78b9 Add corrosion as a subdirectory, CMake fixes
unC0Rr
parents:
diff changeset
     1
# FIXME: ONly test this when cross-compiling?
6a3dc15b78b9 Add corrosion as a subdirectory, CMake fixes
unC0Rr
parents:
diff changeset
     2
corrosion_tests_add_test(hostbuild "rust-host-program")
6a3dc15b78b9 Add corrosion as a subdirectory, CMake fixes
unC0Rr
parents:
diff changeset
     3
6a3dc15b78b9 Add corrosion as a subdirectory, CMake fixes
unC0Rr
parents:
diff changeset
     4
set_tests_properties("hostbuild_run_rust-host-program" PROPERTIES PASS_REGULAR_EXPRESSION
6a3dc15b78b9 Add corrosion as a subdirectory, CMake fixes
unC0Rr
parents:
diff changeset
     5
        "^ok\r?\nHello Rust Hostbuild, I am an external C function"
6a3dc15b78b9 Add corrosion as a subdirectory, CMake fixes
unC0Rr
parents:
diff changeset
     6
        )
6a3dc15b78b9 Add corrosion as a subdirectory, CMake fixes
unC0Rr
parents:
diff changeset
     7
# Run tests are disabled by default when cross-compiling, however we still want to test hostbuild!
6a3dc15b78b9 Add corrosion as a subdirectory, CMake fixes
unC0Rr
parents:
diff changeset
     8
# So we manually re-enable the test here.
6a3dc15b78b9 Add corrosion as a subdirectory, CMake fixes
unC0Rr
parents:
diff changeset
     9
if(CMAKE_CROSSCOMPILING)
6a3dc15b78b9 Add corrosion as a subdirectory, CMake fixes
unC0Rr
parents:
diff changeset
    10
    set_tests_properties("hostbuild_run_rust-host-program" PROPERTIES DISABLED FALSE)
6a3dc15b78b9 Add corrosion as a subdirectory, CMake fixes
unC0Rr
parents:
diff changeset
    11
endif()