Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nifti2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ if(NIFTI_BUILD_TESTING AND NIFTI_BUILD_APPLICATIONS)
if(TEST_INSTALL)
add_test(
NAME install_linking
COMMAND sh ${NIFTI_TEST_SCRIPT_DIR}/install_linking_test.sh ${CMAKE_MAKE_PROGRAM}
COMMAND sh ${NIFTI_TEST_SCRIPT_DIR}/install_linking_test.sh ${CMAKE_MAKE_PROGRAM} ${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY ${PROJECT_BINARY_DIR} )
endif()
endif()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ else
export BUILD_TOOL=$1
fi

# Where the project source lives. This used to be hard-coded as
# ../../nifti_clib relative to the build directory, which only resolved
# when the build tree happened to be a sibling of a source tree named
# exactly "nifti_clib" -- so the test failed for an in-tree build, for a
# build directory named anything else, and on CI.
if [ $# -lt 2 ]
then
echo Missing source directory
exit 1
fi
SRC_DIR=$2

# Set variables for local install
export DESTDIR=installed
export PATH="$PWD/$DESTDIR/usr/local/bin:$PATH"
Expand All @@ -28,7 +40,7 @@ cd downstream_example
cmake \
-G 'Unix Makefiles' \
-DCMAKE_MODULE_PATH=../installed/usr/local/share \
../../nifti_clib/real_easy/minimal_example_of_downstream_usage
"${SRC_DIR}/real_easy/minimal_example_of_downstream_usage"
make

echo Success
Loading