Skip to content

Commit

Permalink
Fixing windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
gmarupilla committed Mar 2, 2021
1 parent 56d0275 commit c2e8345
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 52 deletions.
102 changes: 51 additions & 51 deletions .appveyor/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,57 +8,57 @@ Write-Host "calling cmake in " + $pwd

cmake --version

# cmake -G "Unix Makefiles" `
# -DCMAKE_BUILD_TYPE="Release" `
# -DOPTION_TARGET_MESSAGING=OFF `
# -DOPTION_TARGET_PARALLEL=OFF `
# -DOPTION_TARGET_CHOMBO2D_SOLVER=OFF `
# -DOPTION_TARGET_CHOMBO3D_SOLVER=OFF `
# -DOPTION_TARGET_SMOLDYN_SOLVER=ON `
# -DOPTION_TARGET_FV_SOLVER=ON `
# -DOPTION_TARGET_STOCHASTIC_SOLVER=ON `
# -DOPTION_TARGET_NFSIM_SOLVER=ON `
# -DOPTION_TARGET_MOVINGBOUNDARY_SOLVER=OFF `
# -DOPTION_TARGET_SUNDIALS_SOLVER=ON `
# -DOPTION_TARGET_HY3S_SOLVERS=OFF `
# ..
cmake -G "Unix Makefiles" `
-DCMAKE_BUILD_TYPE="Release" `
-DOPTION_TARGET_MESSAGING=OFF `
-DOPTION_TARGET_PARALLEL=OFF `
-DOPTION_TARGET_CHOMBO2D_SOLVER=OFF `
-DOPTION_TARGET_CHOMBO3D_SOLVER=OFF `
-DOPTION_TARGET_SMOLDYN_SOLVER=ON `
-DOPTION_TARGET_FV_SOLVER=ON `
-DOPTION_TARGET_STOCHASTIC_SOLVER=ON `
-DOPTION_TARGET_NFSIM_SOLVER=ON `
-DOPTION_TARGET_MOVINGBOUNDARY_SOLVER=OFF `
-DOPTION_TARGET_SUNDIALS_SOLVER=ON `
-DOPTION_TARGET_HY3S_SOLVERS=OFF `
..

# make
# <# Building NFSim solver seperately #>
# # rm -rf -f !(bin)
# # rm bin/NFsim_x64.exe
# Write-Host "ls all files in bin directory" + $pwd
# Get-ChildItem C:\projects\vcell-solvers\build\bin\
# Write-Host "Removing wrong build NFsim_x64" + $pwd
# Remove-Item C:\projects\vcell-solvers\build\bin\NFsim_x64.exe
# Get-ChildItem C:\projects\vcell-solvers\build\bin\
# Write-Host "Moving all solvers to tmp directory" + $pwd
# Move-Item C:\projects\vcell-solvers\build\bin\*.exe C:\projects\vcell-solvers\tmp
# Move-Item C:\projects\vcell-solvers\build\bin\*.dll C:\projects\vcell-solvers\tmp
# Get-ChildItem C:\projects\vcell-solvers\tmp\
# Write-Host "Removing everything from build directory" + $pwd
# Remove-Item C:\projects\vcell-solvers\build\* -Recurse -Force
# mkdir bin
make
<# Building NFSim solver seperately #>
# rm -rf -f !(bin)
# rm bin/NFsim_x64.exe
Write-Host "ls all files in bin directory" + $pwd
Get-ChildItem C:\projects\vcell-solvers\build\bin\
Write-Host "Removing wrong build NFsim_x64" + $pwd
Remove-Item C:\projects\vcell-solvers\build\bin\NFsim_x64.exe
Get-ChildItem C:\projects\vcell-solvers\build\bin\
Write-Host "Moving all solvers to tmp directory" + $pwd
Move-Item C:\projects\vcell-solvers\build\bin\*.exe C:\projects\vcell-solvers\tmp
Move-Item C:\projects\vcell-solvers\build\bin\*.dll C:\projects\vcell-solvers\tmp
Get-ChildItem C:\projects\vcell-solvers\tmp\
Write-Host "Removing everything from build directory" + $pwd
Remove-Item C:\projects\vcell-solvers\build\* -Recurse -Force
mkdir bin

# cmake -G "Unix Makefiles" `
# -DBUILD_SHARED_LIBS=OFF `
# -DCMAKE_FIND_LIBRARY_SUFFIXES=".a" `
# -DCMAKE_EXE_LINKER_FLAGS="-static" `
# -DOPTION_TARGET_MESSAGING=OFF `
# -DOPTION_TARGET_PARALLEL=OFF `
# -DOPTION_TARGET_CHOMBO2D_SOLVER=OFF `
# -DOPTION_TARGET_CHOMBO3D_SOLVER=OFF `
# -DOPTION_TARGET_SMOLDYN_SOLVER=OFF `
# -DOPTION_TARGET_FV_SOLVER=OFF `
# -DOPTION_TARGET_STOCHASTIC_SOLVER=OFF `
# -DOPTION_TARGET_NFSIM_SOLVER=ON `
# -DOPTION_TARGET_MOVINGBOUNDARY_SOLVER=OFF `
# -DOPTION_TARGET_SUNDIALS_SOLVER=OFF `
# -DOPTION_TARGET_HY3S_SOLVERS=OFF `
# ..
cmake -G "Unix Makefiles" `
-DBUILD_SHARED_LIBS=OFF `
-DCMAKE_FIND_LIBRARY_SUFFIXES=".a" `
-DCMAKE_EXE_LINKER_FLAGS="-static" `
-DOPTION_TARGET_MESSAGING=OFF `
-DOPTION_TARGET_PARALLEL=OFF `
-DOPTION_TARGET_CHOMBO2D_SOLVER=OFF `
-DOPTION_TARGET_CHOMBO3D_SOLVER=OFF `
-DOPTION_TARGET_SMOLDYN_SOLVER=OFF `
-DOPTION_TARGET_FV_SOLVER=OFF `
-DOPTION_TARGET_STOCHASTIC_SOLVER=OFF `
-DOPTION_TARGET_NFSIM_SOLVER=ON `
-DOPTION_TARGET_MOVINGBOUNDARY_SOLVER=OFF `
-DOPTION_TARGET_SUNDIALS_SOLVER=OFF `
-DOPTION_TARGET_HY3S_SOLVERS=OFF `
..

# make
# Write-Host "Moving all solvers from tmp directory to bin directory" + $pwd
# Move-Item C:\projects\vcell-solvers\tmp\*.exe C:\projects\vcell-solvers\build\bin
# Move-Item C:\projects\vcell-solvers\tmp\*.dll C:\projects\vcell-solvers\build\bin
# Remove-Item C:\projects\vcell-solvers\tmp
make
Write-Host "Moving all solvers from tmp directory to bin directory" + $pwd
Move-Item C:\projects\vcell-solvers\tmp\*.exe C:\projects\vcell-solvers\build\bin
Move-Item C:\projects\vcell-solvers\tmp\*.dll C:\projects\vcell-solvers\build\bin
Remove-Item C:\projects\vcell-solvers\tmp
4 changes: 3 additions & 1 deletion VCell/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ if(UNIX)
endif()
endif()

find_library(zlib REQUIRED)
if (UNIX OR APPLE)
find_library(zlib REQUIRED)
endif()

#
# http://floooh.github.io/2016/01/12/cmake-dependency-juggling.html
Expand Down

0 comments on commit c2e8345

Please sign in to comment.