Skip to content

Commit

Permalink
Allow testing without native wchar_t
Browse files Browse the repository at this point in the history
This helps discovering problems for other platforms.

Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Dec 4, 2016
1 parent d688b82 commit 055f603
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ matrix:
- os: linux
compiler: gcc
env: ARGS="-DENABLE_GETOPT=OFF"
- os: linux
compiler: gcc
env: ARGS="-DUSE_WCHAR_T=OFF"
services:
- mysql
- postgresql
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ check_function_exists (scandir HAVE_SCANDIR)
check_function_exists (alphasort HAVE_ALPHASORT)

set (ENABLE_GETOPT ON CACHE BOOL "Enable getopt usage")
set (USE_WCHAR_T ON CACHE BOOL "Use native wchar_t type")
if (ENABLE_GETOPT)
check_symbol_exists (getopt "unistd.h" HAVE_GETOPT)
check_symbol_exists (getopt_long "getopt.h" HAVE_GETOPT_LONG)
Expand Down
2 changes: 1 addition & 1 deletion cmake/templates/gammu-config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@
#endif
/* Size of wchar_t needs to be 4 bytes to store supplementary plan unicode */
#if @WCHAR_T@ >= 4
#define USE_WCHAR_T
#cmakedefine USE_WCHAR_T
#endif
#ifndef HAVE_WCHAR_T
#cmakedefine HAVE_WCHAR_T
Expand Down

0 comments on commit 055f603

Please sign in to comment.