Commit 84a45634 authored by Andreas Tille's avatar Andreas Tille
Browse files

New upstream version 1.5.3

parent 649638d7
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ compiler:
    - gcc

env:
    matrix:
        - IGNORE_QT=false SHARED=true
        - IGNORE_QT=false SHARED=false
        - IGNORE_QT=true SHARED=true
@@ -30,5 +31,7 @@ before_install:

script:
    - cmake -D BUILD_SHARED_LIBS:BOOL=$SHARED -D IGNORE_QT:BOOL=$IGNORE_QT ../CiftiLib
    - export LD_LIBRARY_PATH=$(if [[ $CXX == "clang++" ]]; then echo -n '/usr/local/clang/lib'; fi)
    - make -j 4
    - example/xmlinfo ../CiftiLib/example/data/ones.dscalar.nii
    - ctest
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ IF (NOT IGNORE_QT)
            SET(LIBS ${LIBS} Qt5::Core)
            #whatever that means
            ADD_DEFINITIONS(-DCIFTILIB_USE_QT)
            SET(CIFTILIB_PKGCONFIG_REQUIRES_LINE "Requires: Qt5Core Qt5Xml")
            SET(CIFTILIB_PKGCONFIG_REQUIRES_LINE "Requires: Qt5Core")
            SET(CIFTILIB_PKGCONFIG_DEFINE "-DCIFTILIB_USE_QT")
        ENDIF (Qt5Core_FOUND)
    ENDIF (QT_FOUND)
+1 −1
Original line number Diff line number Diff line
@@ -231,7 +231,7 @@ EXTENSION_MAPPING =
# func(std::string) {}). This also make the inheritance and collaboration 
# diagrams that involve STL classes more complete and accurate.

BUILTIN_STL_SUPPORT    = NO
BUILTIN_STL_SUPPORT    = YES

# If you use Microsoft's C++/CLI language, you should set this option to YES to 
# enable parsing support.
+20 −6
Original line number Diff line number Diff line
The CiftiLib library requires boost headers and either QT (4.8.x or 5), or libxml++ 2.17.x or newer (and its dependencies: libxml2, glib, sigc++, gtkmm and glibmm) and the boost filesystem library to compile, and optionally uses zlib if you want to use its NIfTI reading capabilities for other purposes.

It is currently set up to be compiled, along with a few simple examples, by cmake:
To build it, and example executables, in the recommended "out-of-source" method using cmake:

#start one level up from the source tree
#make build directory beside the source tree, enter it
#make a build directory beside the source tree, enter it
mkdir build; cd build

#you may want to set the cmake variable CMAKE_BUILD_TYPE to Release or Debug before building
#NOTE: you may want to set the cmake variable CMAKE_BUILD_TYPE to Release or Debug before building
#the default build behavior may be non-optimized and without debug symbols.

#run cmake to generate makefiles
cmake ../CiftiLib -D CMAKE_BUILD_TYPE=Release
cmake -D CMAKE_BUILD_TYPE=Release ../CiftiLib
#OR
cmake-gui ../CiftiLib

#build
make

#OPTIONAL: run tests, make docs
#OPTIONAL: run tests
make test

#install library to location specified by cmake variable CMAKE_INSTALL_PREFIX
make install

#OPTIONAL: generate documentation (needs doxygen installed and on PATH)
make doc

The resulting library and example executables will be in subdirectories of the build directory, not in the source directory.  You can install the library and headers (location controlled by cmake variable CMAKE_INSTALL_PREFIX and make variable DESTDIR) with 'make install'.
The build results will be in subdirectories of the build directory, not in the source directory.

To use the installed library, use pkg-config to get the needed directories and libraries.  For instance, in cmake:

find_package(PkgConfig)
pkg_check_modules(PC_CIFTI REQUIRED CiftiLib)

You can then use cmake variables PC_CIFTI_LIBRARIES, PC_CIFTI_INCLUDE_DIRS, and similar, see here for descriptions:

https://cmake.org/cmake/help/v3.0/module/FindPkgConfig.html

Troubleshooting:

+30 −3
Original line number Diff line number Diff line

PROJECT(example)

ADD_EXECUTABLE(rewrite
rewrite.cxx)

@@ -15,6 +13,13 @@ TARGET_LINK_LIBRARIES(xmlinfo
Cifti
${LIBS})

ADD_EXECUTABLE(datatype
datatype.cxx)

TARGET_LINK_LIBRARIES(datatype
Cifti
${LIBS})

INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/example
${CMAKE_SOURCE_DIR}/src
@@ -29,7 +34,7 @@ ones.dscalar.nii
)

IF(QT_FOUND)
    #QT4
    #QT4 and QT5
    SET(cifti_be_md5s
        3ba20f6ef590735c1211991f8e0144e6
        e3a1639ef4b354752b0abb0613eedb73
@@ -44,6 +49,13 @@ IF(QT_FOUND)
        32345267599b07083092b7dedfd8796c
        512e0359c64d69dde93d605f8797f3a2
    )
    SET(cifti_datatype_md5s
        cca91b955b1134251d62764cb1ebf44c
        6359af74ba6b51357aefab7de7a76097
        10ee62309850e55936fa9f702df8b4d1
        e4997bdd4b8202ff502a19173693c43f
        870dae2d646cadeed1494f6271433499
    )
ELSE(QT_FOUND)
    #xml++
    SET(cifti_be_md5s
@@ -60,6 +72,13 @@ ELSE(QT_FOUND)
        6fabac021e377efd35dede7198feefd4
        fe0cbb768e26aa12a0e03990f4f50a30
    )
    SET(cifti_datatype_md5s
        6db4a73e4e11a1ac0a5e7cbfb56eff40
        f321156573ed8f165b208d84769bfd9a
        794d60d9d397fe341e18313efeeac5ea
        ea43725139bd3e152197fdf22c5e72e7
        4dbb23ab2564ba8c9f242a3cb6036600
    )
ENDIF(QT_FOUND)

#ADD_TEST(timer ${CMAKE_CURRENT_BINARY_DIR}/Tests/test_driver timer)
@@ -76,8 +95,16 @@ FOREACH(index RANGE ${loop_end})
    ADD_TEST(rewrite-little-${testfile} rewrite ${CMAKE_SOURCE_DIR}/example/data/${testfile} little-${testfile} LITTLE)
    LIST(GET cifti_le_md5s ${index} goodsum)
    ADD_TEST(rewrite-little-md5-${testfile} ${CMAKE_COMMAND} -Dgood_sum=${goodsum} -Dcheck_file=little-${testfile} -P ${CMAKE_SOURCE_DIR}/cmake/scripts/testmd5.cmake)
    SET_TESTS_PROPERTIES(rewrite-little-md5-${testfile} PROPERTIES DEPENDS rewrite-little-${testfile})

    ADD_TEST(rewrite-big-${testfile} rewrite ${CMAKE_SOURCE_DIR}/example/data/${testfile} big-${testfile} BIG)
    LIST(GET cifti_be_md5s ${index} goodsum)
    ADD_TEST(rewrite-big-md5-${testfile} ${CMAKE_COMMAND} -Dgood_sum=${goodsum} -Dcheck_file=big-${testfile} -P ${CMAKE_SOURCE_DIR}/cmake/scripts/testmd5.cmake)
    SET_TESTS_PROPERTIES(rewrite-big-md5-${testfile} PROPERTIES DEPENDS rewrite-big-${testfile})
    
    ADD_TEST(datatype-${testfile} datatype ${CMAKE_SOURCE_DIR}/example/data/${testfile} datatype-${testfile})
    LIST(GET cifti_datatype_md5s ${index} goodsum)
    ADD_TEST(datatype-md5-${testfile} ${CMAKE_COMMAND} -Dgood_sum=${goodsum} -Dcheck_file=datatype-${testfile} -P ${CMAKE_SOURCE_DIR}/cmake/scripts/testmd5.cmake)
    SET_TESTS_PROPERTIES(rewrite-big-md5-${testfile} PROPERTIES DEPENDS datatype-${testfile})
    
ENDFOREACH(index RANGE ${loop_end})
Loading