ICU-22954 A build test for C++ header-only APIs with C++ APIs disabled.

This commit is contained in:
Fredrik Roubert 2024-11-21 18:40:15 +01:00 committed by Fredrik Roubert
parent ee8806e87c
commit db42c87936
4 changed files with 16 additions and 1 deletions

View file

@ -75,7 +75,7 @@ numbertest_parse.o numbertest_doubleconversion.o numbertest_skeletons.o \
static_unisets_test.o numfmtdatadriventest.o numbertest_range.o erarulestest.o \
formattedvaluetest.o formatted_string_builder_test.o numbertest_permutation.o \
units_data_test.o units_router_test.o units_test.o displayoptions_test.o \
numbertest_simple.o uchar_type_build_test.o ucolheaderonlytest.o usetheaderonlytest.o
numbertest_simple.o cplusplus_header_api_build_test.o uchar_type_build_test.o ucolheaderonlytest.o usetheaderonlytest.o
DEPS = $(OBJECTS:.o=.d)

View file

@ -0,0 +1,11 @@
// © 2025 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html#License
// ICU-22954 Test that client code can be built with U_SHOW_CPLUSPLUS_API=0.
#undef U_ALL_IMPLEMENTATION
#undef U_SHOW_CPLUSPLUS_API
#define U_SHOW_CPLUSPLUS_API 0
#include "unicode/char16ptr.h"
#include "unicode/ucol.h"
#include "unicode/uset.h"
#include "unicode/utypes.h"

View file

@ -241,6 +241,7 @@
<ClCompile Include="units_data_test.cpp" />
<ClCompile Include="units_router_test.cpp" />
<ClCompile Include="units_test.cpp" />
<ClCompile Include="cplusplus_header_api_build_test.cpp" />
<ClCompile Include="uchar_type_build_test.cpp" />
<ClCompile Include="ucolheaderonlytest.cpp" />
<ClCompile Include="usetheaderonlytest.cpp" />

View file

@ -568,6 +568,9 @@
<ClCompile Include="units_test.cpp">
<Filter>formatting</Filter>
</ClCompile>
<ClCompile Include="cplusplus_header_api_build_test.cpp">
<Filter>configuration</Filter>
</ClCompile>
<ClCompile Include="uchar_type_build_test.cpp">
<Filter>configuration</Filter>
</ClCompile>