Skip to content

Commit

Permalink
add 32 Bit Tests and Binary Loading
Browse files Browse the repository at this point in the history
  • Loading branch information
halentin committed Jun 19, 2024
1 parent 5953888 commit 2572b54
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
julia-arch: [x64]
os: [ubuntu-latest, windows-latest]
experimental: [false]
include:
- os: windows-latest
julia-arch: x86

steps:
# Checks-out your repository
Expand Down
9 changes: 6 additions & 3 deletions src/FMI2/int.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,14 @@ function fmi2Instantiate!(fmu::FMU2;
ptrLogger = @cfunction(fmi2CallbackLogger, Cvoid, (Ptr{FMU2ComponentEnvironment}, Ptr{Cchar}, Cuint, Ptr{Cchar}, Ptr{Cchar}))
if externalCallbacks
if fmu.callbackLibHandle == C_NULL
@assert Sys.WORD_SIZE == 64 "`externalCallbacks=true` is only supported for 64-bit."

@assert Sys.WORD_SIZE == 64 || (Sys.iswindows() && Sys.WORD_SIZE == 32) "`externalCallbacks=true` is only supported for 64-bit and 32-Bit Windows"
cbLibPath = CB_LIB_PATH
if Sys.iswindows()
cbLibPath = joinpath(cbLibPath, "win64", "callbackFunctions.dll")
if Sys.WORD_SIZE == 64
cbLibPath = joinpath(cbLibPath, "win64", "callbackFunctions.dll")
else
cbLibPath = joinpath(cbLibPath, "win32", "callbackFunctions.dll")
end
elseif Sys.islinux()
cbLibPath = joinpath(cbLibPath, "linux64", "libcallbackFunctions.so")
elseif Sys.isapple()
Expand Down

0 comments on commit 2572b54

Please sign in to comment.