From 4da49ea4307c26e4e38e11beb4b3495886460e0e Mon Sep 17 00:00:00 2001 From: Snaipe Date: Tue, 14 Apr 2015 15:07:21 +0200 Subject: [PATCH 1/9] Removed csptr dependency, you must now install it beforehand --- .gitmodules | 3 --- dependencies/csptr | 1 - 2 files changed, 4 deletions(-) delete mode 100644 .gitmodules delete mode 160000 dependencies/csptr diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index fb15be4..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "dependencies/csptr"] - path = dependencies/csptr - url = https://github.com/Snaipe/c-smart-pointers.git diff --git a/dependencies/csptr b/dependencies/csptr deleted file mode 160000 index 4f3e63a..0000000 --- a/dependencies/csptr +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4f3e63aca586939ed734f4e76c4f7f7f8c07d247 From 4d42af0fcb44e8948328c2ee6bca6f9b38812053 Mon Sep 17 00:00:00 2001 From: Snaipe Date: Tue, 14 Apr 2015 15:08:51 +0200 Subject: [PATCH 2/9] Switched the output to a shared library --- Makefile.am | 4 +--- configure.ac | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index bcc7f94..ca07f02 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,9 +16,7 @@ libcriterion_la_CFLAGS = \ $(COVERAGE_CFLAGS) libcriterion_la_LDFLAGS = $(COVERAGE_LDFLAGS) - -# dirty but unless someone has a better alternative... -libcriterion_la_LIBADD = dependencies/csptr/src/libcsptr_la-*.lo +libcriterion_la_LIBADD = -lcsptr EXTRA_DIST = config.rpath LICENSE diff --git a/configure.ac b/configure.ac index 836281f..4e3160f 100644 --- a/configure.ac +++ b/configure.ac @@ -7,7 +7,7 @@ LT_PREREQ([2.2.4]) AC_CANONICAL_SYSTEM AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip foreign subdir-objects parallel-tests color-tests]) -LT_INIT([disable-shared]) +LT_INIT([disable-static]) AC_CONFIG_MACRO_DIR([m4]) AC_PROG_CC From 8bec0a72309ee33146022ce215aab1ab3aa96a8f Mon Sep 17 00:00:00 2001 From: Snaipe Date: Tue, 14 Apr 2015 17:14:42 +0200 Subject: [PATCH 3/9] Removed filesystem dependency to libcsptr and link to the static library --- Makefile.am | 4 +--- configure.ac | 6 ++++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile.am b/Makefile.am index ca07f02..f16b156 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ ACLOCAL_AMFLAGS = -I m4 AM_CPPFLAGS = -DLOCALEDIR='"$(localedir)"' -SUBDIRS = po dependencies/csptr samples +SUBDIRS = po samples lib_LTLIBRARIES = libcriterion.la @@ -12,11 +12,9 @@ libcriterion_la_CFLAGS = \ -std=gnu11 \ -I$(top_srcdir)/src/ \ -I$(top_srcdir)/include/ \ - -I$(top_srcdir)/dependencies/csptr/include/ \ $(COVERAGE_CFLAGS) libcriterion_la_LDFLAGS = $(COVERAGE_LDFLAGS) -libcriterion_la_LIBADD = -lcsptr EXTRA_DIST = config.rpath LICENSE diff --git a/configure.ac b/configure.ac index 4e3160f..360c9c5 100644 --- a/configure.ac +++ b/configure.ac @@ -20,6 +20,10 @@ AC_PROG_LN_S AC_PROG_MAKE_SET AC_SUBST([LIBTOOL_DEPS]) +AC_CHECK_LIB([csptr], [smalloc], [], [AC_MSG_ERROR([Could not find libcsptr dependency. \ + Please go to https://github.com/Snaipe/c-smart-pointers.git \ + and follow the installation instructions.])]) + AC_FUNC_FNMATCH enable_rt_tests="no" @@ -43,6 +47,4 @@ AC_ARG_ENABLE([gcov], AC_CONFIG_HEADERS([src/config.h]) AC_CONFIG_FILES([Makefile samples/Makefile po/Makefile.in]) -AC_CONFIG_SUBDIRS([dependencies/csptr]) - AC_OUTPUT From e2f3daa07b3306108c28c89ff5067c252829e6ac Mon Sep 17 00:00:00 2001 From: Snaipe Date: Wed, 15 Apr 2015 00:19:10 +0200 Subject: [PATCH 4/9] Added libcsptr installation script --- .ci/install-libcsptr.sh | 14 ++++++++++++++ .travis.yml | 1 + appveyor.yml | 1 + 3 files changed, 16 insertions(+) create mode 100755 .ci/install-libcsptr.sh diff --git a/.ci/install-libcsptr.sh b/.ci/install-libcsptr.sh new file mode 100755 index 0000000..fd0f471 --- /dev/null +++ b/.ci/install-libcsptr.sh @@ -0,0 +1,14 @@ +#!/bin/bash +repo="https://github.com/Snaipe/libcsptr.git" +tag="v2.0.1" + +mkdir dependencies +git clone --branch ${tag} --depth 1 ${repo} dependencies/libcsptr && +( + cd dependencies/libcsptr && + ./autogen.sh && + ./configure --prefix=/usr && + make && + sudo make install +) +rm -Rf dependencies diff --git a/.travis.yml b/.travis.yml index 55f5f64..43565d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ before_install: - sudo apt-get -qq install -y check gcc-4.9 gettext autopoint - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 90 - sudo pip install cpp-coveralls + - .ci/install-libcsptr.sh script: - ./autogen.sh && ./configure --enable-gcov CFLAGS="-g -O0" && make && make check after_success: diff --git a/appveyor.yml b/appveyor.yml index 76e605f..55db7d9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -53,6 +53,7 @@ configuration: Release install: - 'set GCOV_PREFIX=%APPVEYOR_BUILD_FOLDER%' + - '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; .ci/install-libcsptr.sh"' - "%CYG_BASH% -lc 'cd $APPVEYOR_BUILD_FOLDER; ./autogen.sh'" - '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0 Date: Wed, 15 Apr 2015 13:06:55 +0200 Subject: [PATCH 5/9] Fixed bad file descriptor error on appveyor builds --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 55db7d9..096f56e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -53,7 +53,7 @@ configuration: Release install: - 'set GCOV_PREFIX=%APPVEYOR_BUILD_FOLDER%' - - '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; .ci/install-libcsptr.sh"' + - '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0 Date: Wed, 15 Apr 2015 13:34:34 +0200 Subject: [PATCH 6/9] Added sudo-less install for cygwin builds --- .ci/install-libcsptr.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.ci/install-libcsptr.sh b/.ci/install-libcsptr.sh index fd0f471..79b4d4d 100755 --- a/.ci/install-libcsptr.sh +++ b/.ci/install-libcsptr.sh @@ -9,6 +9,12 @@ git clone --branch ${tag} --depth 1 ${repo} dependencies/libcsptr && ./autogen.sh && ./configure --prefix=/usr && make && - sudo make install + { + if command -v sudo; then + sudo make install + else + make install + fi + } ) rm -Rf dependencies From 39c8dfd6af9c25d73373c26e9db5c1618655b65f Mon Sep 17 00:00:00 2001 From: Snaipe Date: Wed, 15 Apr 2015 17:26:16 +0200 Subject: [PATCH 7/9] Fixed libcsptr misinstalling on appveyor builds --- .ci/install-libcsptr.sh | 4 ++-- .travis.yml | 2 +- appveyor.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.ci/install-libcsptr.sh b/.ci/install-libcsptr.sh index 79b4d4d..2826ec7 100755 --- a/.ci/install-libcsptr.sh +++ b/.ci/install-libcsptr.sh @@ -1,13 +1,13 @@ #!/bin/bash repo="https://github.com/Snaipe/libcsptr.git" -tag="v2.0.1" +tag="v2.0.2" mkdir dependencies git clone --branch ${tag} --depth 1 ${repo} dependencies/libcsptr && ( cd dependencies/libcsptr && ./autogen.sh && - ./configure --prefix=/usr && + ./configure "$@" && make && { if command -v sudo; then diff --git a/.travis.yml b/.travis.yml index 43565d4..f8901f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ before_install: - sudo apt-get -qq install -y check gcc-4.9 gettext autopoint - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 90 - sudo pip install cpp-coveralls - - .ci/install-libcsptr.sh + - .ci/install-libcsptr.sh --prefix=/usr script: - ./autogen.sh && ./configure --enable-gcov CFLAGS="-g -O0" && make && make check after_success: diff --git a/appveyor.yml b/appveyor.yml index 096f56e..1083154 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -53,7 +53,7 @@ configuration: Release install: - 'set GCOV_PREFIX=%APPVEYOR_BUILD_FOLDER%' - - '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0 Date: Wed, 15 Apr 2015 17:50:33 +0200 Subject: [PATCH 8/9] Added -no-undefined link option for PE targets --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index f16b156..54a5eb3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -14,7 +14,7 @@ libcriterion_la_CFLAGS = \ -I$(top_srcdir)/include/ \ $(COVERAGE_CFLAGS) -libcriterion_la_LDFLAGS = $(COVERAGE_LDFLAGS) +libcriterion_la_LDFLAGS = $(COVERAGE_LDFLAGS) -no-undefined EXTRA_DIST = config.rpath LICENSE From 6ba229cae37f61e6bae189573f4dc66fb553b67c Mon Sep 17 00:00:00 2001 From: Snaipe Date: Sun, 3 May 2015 23:10:14 +0200 Subject: [PATCH 9/9] Temporarly dropped support for windows --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8e35b6e..3c30899 100644 --- a/README.md +++ b/README.md @@ -31,13 +31,12 @@ the user would have with other frameworks: reported and tested. * [x] Progress and statistics can be followed in real time with report hooks. * [x] TAP output format can be enabled with an option. -* [x] Runs on Linux, FreeBSD, Mac OS X, and Windows (Compiles only with MinGW or Cygwin). +* [x] Runs on Linux, FreeBSD, and Mac OS X (Windows is currenly not completely supported). ## Downloads * [Linux (x86_64)](https://github.com/Snaipe/Criterion/releases/download/v1.1.0/criterion-1.1.0-linux-x86_64.tar.bz2) * [OS X (x86_64)](https://github.com/Snaipe/Criterion/releases/download/v1.1.0/criterion-1.1.0-osx-x86_64.tar.bz2) -* [Windows (x86_64)](https://github.com/Snaipe/Criterion/releases/download/v1.1.0/criterion-1.1.0-win-x86_64.tar.bz2) * [FreeBSD (x86_64)](https://github.com/Snaipe/Criterion/releases/download/v1.1.0/criterion-1.1.0-freebsd-x86_64.tar.bz2) If you have a different platform, you can still [build the library from source](http://criterion.readthedocs.org/en/latest/setup.html#installation) @@ -99,8 +98,8 @@ A. I worked with CUnit and Check, and I must say that they do their job **Q. Where has this been tested?** A. Currently, on Linux 2.6.32 and Linux 3.15.7, although it should work on - most \*nix systems; Mac OS X Yosemite 10.10, FreeBSD 10.0, and finally - Windows 7 (with the MinGW and Cygwin ports of GCC). + most \*nix systems; Mac OS X Yosemite 10.10, and FreeBSD 10.0. + Windows is currently not supported, but it being worked on. [online-docs]: http://criterion.readthedocs.org/ [pdf-docs]: http://readthedocs.org/projects/criterion/downloads/pdf/latest/