diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index bcb691092..887eaea3b 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -115,11 +115,6 @@ if ! $(disable-icu) } -actions regex_simple_run_action -{ - $(>) > $(<) -} - rule regex-run-simple ( sources + : args * : input-files * : requirements * : target-name ) { exe $(target-name)_exe : $(sources) : $(requirements) ; @@ -129,7 +124,7 @@ rule regex-run-simple ( sources + : args * : input-files * : requirements * : ta alias $(target-name) : $(target-name).output ; } -regex-run-simple has_icu_test.cpp : : : $(ICU_OPTS) : has_icu ; +unit-test has_icu : has_icu_test.cpp : $(ICU_OPTS) ; explicit has_icu ; alias icu_options : : : : [ check-target-builds has_icu : $(ICU_OPTS) : ] ; diff --git a/build/has_icu_test.cpp b/build/has_icu_test.cpp index 8d42e25c0..7886b352a 100644 --- a/build/has_icu_test.cpp +++ b/build/has_icu_test.cpp @@ -21,6 +21,11 @@ #error "Mixing ICU with a static runtime doesn't work" #endif +void print_error(UErrorCode err, const char* func) +{ + std::cerr << "Error from function " << func << " with error: " << ::u_errorName(err) << std::endl; +} + int main() { // To detect possible binary mismatches between the installed ICU build, and whatever @@ -31,8 +36,17 @@ int main() UErrorCode err = U_ZERO_ERROR; UChar32 c = ::u_charFromName(U_UNICODE_CHAR_NAME, "GREEK SMALL LETTER ALPHA", &err); std::cout << (int)c << std::endl; - if(err > 0) return err; + if(err > 0) + { + print_error(err, "u_charFromName"); + return err; + } U_NAMESPACE_QUALIFIER Locale l; boost::scoped_ptr p_col(U_NAMESPACE_QUALIFIER Collator::createInstance(l, err)); + if(err > 0) + { + print_error(err, "Collator::createInstance"); + return err; + } return err > 0 ? err : 0; }