diff options
Diffstat (limited to 'vcpkg/scripts/test_ports/vcpkg-ci-vcpkg-make/test-scripts-cl_cpp_wrapper.cmake')
| -rw-r--r-- | vcpkg/scripts/test_ports/vcpkg-ci-vcpkg-make/test-scripts-cl_cpp_wrapper.cmake | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-vcpkg-make/test-scripts-cl_cpp_wrapper.cmake b/vcpkg/scripts/test_ports/vcpkg-ci-vcpkg-make/test-scripts-cl_cpp_wrapper.cmake new file mode 100644 index 0000000..67d8b70 --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-vcpkg-make/test-scripts-cl_cpp_wrapper.cmake @@ -0,0 +1,25 @@ +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_configure_make picks scripts/buildsystems/make_wrapper/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_configure_make(SOURCE_PATH "${SOURCE_PATH}" COPY_SOURCE USE_WRAPPERS) +]]) + +unit_test_ensure_success([[ + set(ENV{TEST_FLAGS} -DEXPECT_SUCCESS) + vcpkg_configure_make(SOURCE_PATH "${SOURCE_PATH}" COPY_SOURCE USE_WRAPPERS) +]]) + +vcpkg_restore_env_variables(VARS CPP TEST_FLAGS) +endblock() |