diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/scripts/test_ports/vcpkg-ci-vcpkg-make/test-vcpkg-make-cl_cpp_wrapper.cmake | |
Diffstat (limited to 'vcpkg/scripts/test_ports/vcpkg-ci-vcpkg-make/test-vcpkg-make-cl_cpp_wrapper.cmake')
| -rw-r--r-- | vcpkg/scripts/test_ports/vcpkg-ci-vcpkg-make/test-vcpkg-make-cl_cpp_wrapper.cmake | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-vcpkg-make/test-vcpkg-make-cl_cpp_wrapper.cmake b/vcpkg/scripts/test_ports/vcpkg-ci-vcpkg-make/test-vcpkg-make-cl_cpp_wrapper.cmake new file mode 100644 index 0000000..b7a15ff --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-vcpkg-make/test-vcpkg-make-cl_cpp_wrapper.cmake @@ -0,0 +1,33 @@ +block() +set(SOURCE_PATH "${CURRENT_PORT_DIR}/test-cl_cpp_wrapper") +set(VCPKG_BUILD_TYPE release) + +vcpkg_backup_env_variables(VARS CPP TEST_FLAGS) + +# Test that that CPP processes stdin +# vcpkg_make_configure picks (installed) ports/vcpkg-make/wrappers/cl_cpp_wrapper + +if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + set(ENV{CPP} "cl_cpp_wrapper") +endif() + +unit_test_ensure_fatal_error([[ + set(ENV{TEST_FLAGS} -DEXPECT_FAILURE) + vcpkg_make_configure(SOURCE_PATH "${SOURCE_PATH}" COPY_SOURCE) +]]) + +unit_test_ensure_success([[ + set(ENV{TEST_FLAGS} -DEXPECT_SUCCESS) + vcpkg_make_configure(SOURCE_PATH "${SOURCE_PATH}" COPY_SOURCE) +]]) + +# In verbose mode (V=1), the command line is echoed. +# This is is diagnostic output and must not go to stdout. +unit_test_ensure_success([[ + set(ENV{TEST_FLAGS} "-DEXPECT_SUCCESS -DOOPS_ECHOED_INVOCATION") + set(ENV{V} 1) + vcpkg_make_configure(SOURCE_PATH "${SOURCE_PATH}" COPY_SOURCE) +]]) + +vcpkg_restore_env_variables(VARS CPP TEST_FLAGS) +endblock() |