mirror of
https://github.com/vgough/encfs.git
synced 2024-11-21 23:43:26 +01:00
Update cmake (#309)
* Update cmake * Update cmake, make Travis use it * Enable all tests in a single command : make check * Make cmake flawlessly run with Debian jessie cmake 3.0.2 * Make Travis use our own cmake 3.0.2 compiled version * Typo in preferred version * Be sure travis will have gettext
This commit is contained in:
parent
c270963df8
commit
f75854cd31
@ -18,13 +18,15 @@ env:
|
||||
- secure: "KuAAwjiIqkk4vqSX/M3ZZIvQs6edm+tV8IADiklTUYZIFyxu8FgZ6RbDdMD2sef5bNZA1OZhlcbeRtiKff5CfMtvzc607Lg3NUkpi+ShMynWgqS/e0uCMf9ogEJlUiZMxf4juBi7v6DyMl/WV6pAdJmdfHtzcj8GF2mgTfQjkO8="
|
||||
|
||||
before_script:
|
||||
- sh ci/install-cmake.sh
|
||||
- sudo modprobe fuse
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake ..
|
||||
- ../ci/cmake/bin/cmake --version
|
||||
- ../ci/cmake/bin/cmake ..
|
||||
|
||||
script:
|
||||
- if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then make && ./checkops && cd .. && ./test.sh ; fi
|
||||
- if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then make && make check ; fi
|
||||
|
||||
addons:
|
||||
coverity_scan:
|
||||
@ -42,6 +44,6 @@ addons:
|
||||
packages:
|
||||
- attr
|
||||
- clang
|
||||
- cmake
|
||||
- fuse
|
||||
- libfuse-dev
|
||||
- gettext
|
||||
|
@ -1,5 +1,9 @@
|
||||
# 3.1 preferred, but we can often get by with 2.8.
|
||||
# 3.0.2 preferred, but we can often get by with 2.8.
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION} LESS 3.0.2)
|
||||
message(WARNING "You should use cmake 3.0.2 or newer for configuration to run correctly.")
|
||||
endif()
|
||||
|
||||
project(EncFS C CXX)
|
||||
|
||||
set (ENCFS_MAJOR 1)
|
||||
@ -245,15 +249,26 @@ endif (POD2MAN)
|
||||
|
||||
# Tests
|
||||
enable_testing()
|
||||
|
||||
if (CMAKE_CONFIGURATION_TYPES)
|
||||
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}
|
||||
--force-new-ctest-process --output-on-failure
|
||||
--build-config "$<CONFIGURATION>")
|
||||
else()
|
||||
add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}
|
||||
--force-new-ctest-process --output-on-failure)
|
||||
endif()
|
||||
|
||||
add_test (NAME checkops
|
||||
COMMAND checkops)
|
||||
|
||||
find_program (PERL_PROGRAM perl)
|
||||
if (PERL_PROGRAM)
|
||||
file(GLOB pl_test_files "tests/*.t.pl")
|
||||
#add_test (NAME scriptedtests
|
||||
# COMMAND ${PERL_PROGRAM} -I ${CMAKE_CURRENT_LIST_DIR}
|
||||
# -MTest::Harness
|
||||
# -e "$$Test::Harness::verbose=1; runtests @ARGV;"
|
||||
# ${pl_test_files})
|
||||
add_test (NAME scriptedtests
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
COMMAND ${PERL_PROGRAM}
|
||||
-MTest::Harness
|
||||
-e "$$Test::Harness::verbose=1; runtests @ARGV;"
|
||||
${pl_test_files})
|
||||
endif (PERL_PROGRAM)
|
||||
|
@ -21,7 +21,7 @@ Optional, but strongly recommended, is running the test suite
|
||||
to verify that the generated binaries work as expected
|
||||
(runtime: 20 seconds)
|
||||
|
||||
make test
|
||||
make check
|
||||
|
||||
The compilation process creates two executables, encfs and encfsctl in
|
||||
the encfs directory. You can install to in a system directory via
|
||||
@ -46,7 +46,7 @@ EncFS depends on a number of libraries:
|
||||
* tinyxml2 : for reading and writing XML configuration files
|
||||
* gettext : internationalization support
|
||||
* libintl : internationalization support
|
||||
* cmake : version 3.2 or newer
|
||||
* cmake : version 3.0.2 (Debian jessie version) or newer
|
||||
* GNU make or ninja-build : to run the build for cmake
|
||||
|
||||
Compiling on Debian and Ubuntu
|
||||
|
BIN
ci/cmake-3.0.2-Linux-x86_64.tar.gz
Normal file
BIN
ci/cmake-3.0.2-Linux-x86_64.tar.gz
Normal file
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
set -x
|
||||
set -e
|
||||
if [ ! -e ci/cmake/bin/cmake ]; then
|
||||
wget http://www.cmake.org/files/v3.1/cmake-3.1.3-Linux-x86_64.tar.gz
|
||||
tar -xzf cmake-3.1.3-Linux-x86_64.tar.gz
|
||||
mv cmake-3.1.3-Linux-x86_64 ci/cmake
|
||||
#wget http://www.cmake.org/files/v3.1/cmake-3.1.0-Linux-x86_64.tar.gz
|
||||
tar -xzf ci/cmake-3.0.2-Linux-x86_64.tar.gz
|
||||
mv cmake-3.0.2-Linux-x86_64 ci/cmake
|
||||
fi
|
||||
|
59
cmake/FindIntl.cmake
Normal file
59
cmake/FindIntl.cmake
Normal file
@ -0,0 +1,59 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#.rst:
|
||||
# FindIntl
|
||||
# --------
|
||||
#
|
||||
# Find the Gettext libintl headers and libraries.
|
||||
#
|
||||
# This module reports information about the Gettext libintl
|
||||
# installation in several variables. General variables::
|
||||
#
|
||||
# Intl_FOUND - true if the libintl headers and libraries were found
|
||||
# Intl_INCLUDE_DIRS - the directory containing the libintl headers
|
||||
# Intl_LIBRARIES - libintl libraries to be linked
|
||||
#
|
||||
# The following cache variables may also be set::
|
||||
#
|
||||
# Intl_INCLUDE_DIR - the directory containing the libintl headers
|
||||
# Intl_LIBRARY - the libintl library (if any)
|
||||
#
|
||||
# .. note::
|
||||
# On some platforms, such as Linux with GNU libc, the gettext
|
||||
# functions are present in the C standard library and libintl
|
||||
# is not required. ``Intl_LIBRARIES`` will be empty in this
|
||||
# case.
|
||||
#
|
||||
# .. note::
|
||||
# If you wish to use the Gettext tools (``msgmerge``,
|
||||
# ``msgfmt``, etc.), use :module:`FindGettext`.
|
||||
|
||||
|
||||
# Written by Roger Leigh <rleigh@codelibre.net>
|
||||
|
||||
# Find include directory
|
||||
find_path(Intl_INCLUDE_DIR
|
||||
NAMES "libintl.h"
|
||||
DOC "libintl include directory")
|
||||
mark_as_advanced(Intl_INCLUDE_DIR)
|
||||
|
||||
# Find all Intl libraries
|
||||
find_library(Intl_LIBRARY "intl"
|
||||
DOC "libintl libraries (if not in the C library)")
|
||||
mark_as_advanced(Intl_LIBRARY)
|
||||
|
||||
#include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Intl
|
||||
FOUND_VAR Intl_FOUND
|
||||
REQUIRED_VARS Intl_INCLUDE_DIR
|
||||
FAIL_MESSAGE "Failed to find Gettext libintl")
|
||||
|
||||
if(Intl_FOUND)
|
||||
set(Intl_INCLUDE_DIRS "${Intl_INCLUDE_DIR}")
|
||||
if(Intl_LIBRARY)
|
||||
set(Intl_LIBRARIES "${Intl_LIBRARY}")
|
||||
else()
|
||||
unset(Intl_LIBRARIES)
|
||||
endif()
|
||||
endif()
|
Loading…
Reference in New Issue
Block a user