Skip to content

Commit

Permalink
reduce number of separate VERSION files being used by CMake (CMakeLis…
Browse files Browse the repository at this point in the history
…ts.txt now use top-level VERSION_CPP)
  • Loading branch information
grlee77 committed Oct 31, 2023
1 parent 75cd8e8 commit 6a4518d
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 9 deletions.
4 changes: 4 additions & 0 deletions ci/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,23 @@ else
fi

# First build the C++ lib using CMake via the run script
echo "libcucim version: `cat VERSION_CPP`"
./run build_local libcucim ${CMAKE_BUILD_TYPE}

# Current `pip wheel` build assumes all shared libraries exist in this path
PYTHON_CLARA_SO_PREFIX_PATH="./python/cucim/src/cucim/clara/"

# Build the C++ cuslide and cumed plugins
# (omit copying binaries as they don't go in the wheel)
echo "cuslide version: `cat cpp/plugins/cucim.kit.cuslide/VERSION`"
./run build_local cuslide ${CMAKE_BUILD_TYPE}
cp -P -r cpp/plugins/cucim.kit.cuslide/install/lib/* ${PYTHON_CLARA_SO_PREFIX_PATH}
echo "cumed version: `cat cpp/plugins/cucim.kit.cumed/VERSION`"
./run build_local cumed ${CMAKE_BUILD_TYPE}
cp -P -r cpp/plugins/cucim.kit.cumed/install/lib/* ${PYTHON_CLARA_SO_PREFIX_PATH}

# Compile the Python bindings
echo "cucim bindings version: `cat VERSION_CPP`"
./run build_local cucim ${CMAKE_BUILD_TYPE}
cp -P install/lib/*.so ${PYTHON_CLARA_SO_PREFIX_PATH}

Expand Down
3 changes: 0 additions & 3 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ echo "${NEXT_FULL_TAG}" > VERSION
# update VERSION files used by C++/CMake (TODO: avoid these duplicate copies)
NEXT_CPP_LONG_TAG=${NEXT_MAJOR}.${NEXT_MINOR}.${NEXT_PATCH} # no leading 'v' or trailing 'a'
echo "${NEXT_CPP_LONG_TAG}" > VERSION_CPP
sed_runner "s/${CURRENT_LONG_TAG}/${NEXT_CPP_LONG_TAG}/g" python/cucim/VERSION
sed_runner "s/${CURRENT_LONG_TAG}/${NEXT_CPP_LONG_TAG}/g" cpp/plugins/cucim.kit.cuslide/VERSION
sed_runner "s/${CURRENT_LONG_TAG}/${NEXT_CPP_LONG_TAG}/g" cpp/plugins/cucim.kit.cumed/VERSION

sed_runner "s#\[Version ${CURRENT_LONG_TAG}\](release_notes/v${CURRENT_LONG_TAG}.md)#\[Version ${NEXT_FULL_TAG}\](release_notes/v${NEXT_FULL_TAG}.md)#g" python/cucim/docs/index.md
sed_runner "s/v${CURRENT_LONG_TAG}/v${NEXT_FULL_TAG}/g" python/cucim/docs/getting_started/index.md
Expand Down
2 changes: 1 addition & 1 deletion cpp/plugins/cucim.kit.cumed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ cmake_minimum_required(VERSION 3.18)

# Set VERSION
unset(VERSION CACHE)
file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/VERSION VERSION)
file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/../../../VERSION_CPP VERSION)

# Append local cmake module path
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules")
Expand Down
1 change: 0 additions & 1 deletion cpp/plugins/cucim.kit.cumed/VERSION

This file was deleted.

2 changes: 1 addition & 1 deletion cpp/plugins/cucim.kit.cuslide/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ cmake_minimum_required(VERSION 3.18)

# Set VERSION
unset(VERSION CACHE)
file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/VERSION VERSION)
file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/../../../VERSION_CPP VERSION)

# Append local cmake module path
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules")
Expand Down
1 change: 0 additions & 1 deletion cpp/plugins/cucim.kit.cuslide/VERSION

This file was deleted.

2 changes: 1 addition & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ cmake_minimum_required(VERSION 3.18)

# Set VERSION
unset(VERSION CACHE)
file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/../VERSION VERSION)
file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/../VERSION_CPP VERSION)

# Append local cmake module path
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules")
Expand Down
1 change: 0 additions & 1 deletion python/cucim/VERSION

This file was deleted.

0 comments on commit 6a4518d

Please sign in to comment.