Skip to content

Commit

Permalink
windows correct version
Browse files Browse the repository at this point in the history
  • Loading branch information
PraneethJain committed Mar 4, 2024
1 parent c14f51b commit a5a7d71
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ jobs:
cd build
cmake --build . --config Release
julia -e "using Pkg; Pkg.Registry.add(\"General\"); Pkg.Registry.add(RegistrySpec(url = \"https://github.com/barche/CxxWrapTestRegistry.git\"))"
julia -e "using Pkg; pkg\"add CxxWrap#testjll\"; using CxxWrap;"
julia -e "using Pkg; pkg\"add ${{github.event.pull_request.body}}\"; using CxxWrap;"
ctest -j 1 -C Release -V
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ endif()
# ============

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
set(Julia_PREFIX "/home/bp87/julia-1.10.1")
find_package(Julia REQUIRED)

set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib;${Julia_LIBRARY_DIR}")
Expand Down
18 changes: 7 additions & 11 deletions FindJulia.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,12 @@ endif()
# Julia Version #
#################

if(Julia_EXECUTABLE)
execute_process(
COMMAND "${Julia_EXECUTABLE}" --startup-file=no --version
OUTPUT_VARIABLE Julia_VERSION_STRING
)
else()
find_file(Julia_VERSION_INCLUDE julia_version.h PATH_SUFFIXES include/julia)
file(READ ${Julia_VERSION_INCLUDE} Julia_VERSION_STRING)
string(REGEX MATCH "JULIA_VERSION_STRING.*" Julia_VERSION_STRING ${Julia_VERSION_STRING})
endif()

execute_process(
COMMAND " /home/bp87/julia-1.10.1/bin/julia" --startup-file=no --version
OUTPUT_VARIABLE Julia_VERSION_STRING
)


string(
REGEX REPLACE ".*([0-9]+\\.[0-9]+\\.[0-9]+).*" "\\1"
Expand All @@ -45,7 +41,7 @@ MESSAGE(STATUS "Julia_VERSION_STRING: ${Julia_VERSION_STRING}")
##################

set(JULIA_HOME_NAME "Sys.BINDIR")
if(${Julia_VERSION_STRING} VERSION_LESS "0.7.0")
if("1.10.1" VERSION_LESS "0.7.0")
set(JULIA_HOME_NAME "JULIA_HOME")
else()
set(USING_LIBDL "using Libdl")
Expand Down

0 comments on commit a5a7d71

Please sign in to comment.