Skip to content

Commit

Permalink
Fix macOS version symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
barche committed Jun 4, 2024
1 parent 4403913 commit c0c375b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/test-linux-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,17 @@ jobs:
rm -f /opt/hostedtoolcache/julia/1.6*/x64/lib/julia/libstdc++.so.6
fi
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/install -DAPPEND_OVERRIDES_TOML=ON -DOVERRIDE_VERSION_TO_JLL=ON -DCMAKE_BUILD_TYPE=Debug ..
cmake -DCMAKE_INSTALL_PREFIX=$HOME/install -DAPPEND_OVERRIDES_TOML=ON -DCMAKE_BUILD_TYPE=Debug ..
VERBOSE=ON cmake --build . --config Debug --target install
curl -o lasttag.json "https://api.github.com/repos/JuliaBinaryWrappers/libcxxwrap_julia_jll.jl/tags?per_page=1"
cat lasttag.json
jllversion=$(cat lasttag.json | grep "name" | sed -r 's/.*v(.*)\+.*/\1/')
cd lib
if [ ! -f libcxxwrap_julia.${jllversion}.dylib ]; then
ln -s libcxxwrap_julia.*.*.*.* libcxxwrap_julia.${jllversion}.dylib
fi
cd ..
ls -al lib
julia -e "using Pkg; pkg\"add ${package}\"; using CxxWrap"
ctest -V
- name: Build testlib
Expand Down
15 changes: 0 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,28 +114,13 @@ set(JLCXX_SOURCES
# Versioning
# ==========

option(OVERRIDE_VERSION_TO_JLL "Override the version info to match the installed JLL, so the filenames match for the Overrides.toml" OFF)

file(STRINGS "${JLCXX_INCLUDE_DIR}/jlcxx/jlcxx_config.hpp" jlcxx_version_defines
REGEX "#define JLCXX_VERSION_(MAJOR|MINOR|PATCH)")
foreach(ver ${jlcxx_version_defines})
if(ver MATCHES "#define JLCXX_VERSION_(MAJOR|MINOR|PATCH) +([^ ]+)$")
set(JLCXX_VERSION_${CMAKE_MATCH_1} "${CMAKE_MATCH_2}" CACHE INTERNAL "")
endif()
endforeach()
if(OVERRIDE_VERSION_TO_JLL)
execute_process(
COMMAND git describe --tags --abbrev=0
OUTPUT_VARIABLE _JLL_VERSION
)
string(STRIP "${_JLL_VERSION}" _JLL_VERSION)
message(STATUS "git version: ${_JLL_VERSION}")
string(REGEX REPLACE "v" "" _JLL_VERSION "${_JLL_VERSION}")
string(REPLACE "." ";" _jlcxx_VERSION_LIST "${_JLL_VERSION}")
list(GET _jlcxx_VERSION_LIST 0 JLCXX_VERSION_MAJOR)
list(GET _jlcxx_VERSION_LIST 1 JLCXX_VERSION_MINOR)
list(GET _jlcxx_VERSION_LIST 2 JLCXX_VERSION_PATCH)
endif()
set(${PROJECT_NAME}_VERSION
${JLCXX_VERSION_MAJOR}.${JLCXX_VERSION_MINOR}.${JLCXX_VERSION_PATCH})
message(STATUS "${PROJECT_NAME} version: v${${PROJECT_NAME}_VERSION}")
Expand Down

0 comments on commit c0c375b

Please sign in to comment.