diff --git a/.travis.yml b/.travis.yml index 7c52125..5bd591f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,8 +23,7 @@ branches: - travis before_script: - - sudo modprobe fuse - - cmake --version + - ./ci/setup.sh script: - ./ci/check.sh diff --git a/build.sh b/build.sh index 04604d7..87985de 100755 --- a/build.sh +++ b/build.sh @@ -7,7 +7,7 @@ if [[ ! -d build ]] then mkdir build cd build - cmake .. + cmake .. $* cd .. fi diff --git a/ci/check.sh b/ci/check.sh index 36367f9..5d5e9ca 100755 --- a/ci/check.sh +++ b/ci/check.sh @@ -1,12 +1,19 @@ #!/bin/bash -eu +cmake --version + +CFG="" +if [ "$TRAVIS_OS_NAME" = "osx" ]; then + CFG="-DENABLE_NLS=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl" +fi + if [[ ! -d build ]] then - mkdir build + mkdir build fi cd build -cmake .. +cmake .. ${CFG} make -j2 make test diff --git a/ci/setup.sh b/ci/setup.sh new file mode 100755 index 0000000..1482194 --- /dev/null +++ b/ci/setup.sh @@ -0,0 +1,10 @@ +#!/bin/bash -eu + +if [ "$TRAVIS_OS_NAME" == "linux" ]; then + sudo modprobe fuse +fi + +if [ "$TRAVIS_OS_NAME" == "osx" ]; then + brew cask install osxfuse +fi + diff --git a/encfs/FileUtils.cpp b/encfs/FileUtils.cpp index 3fb0c8c..444b2e8 100644 --- a/encfs/FileUtils.cpp +++ b/encfs/FileUtils.cpp @@ -1035,7 +1035,7 @@ RootPtr createV6Config(EncFS_Context *ctx, alg = findCipherAlgorithm("AES", keySize); // If case-insensitive system, opt for Block32 filename encoding -#if DEFAULT_CASE_INSENSITIVE +#if defined(DEFAULT_CASE_INSENSITIVE) nameIOIface = BlockNameIO::CurrentInterface(true); #else nameIOIface = BlockNameIO::CurrentInterface();