Skip to content

Commit

Permalink
Update CMakeLsits for VS and ifort compilation (NREL#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
ghylander authored Nov 9, 2021
1 parent 5241886 commit 6f25429
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions ROSCO/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,14 @@ if(APPLE OR UNIX)
else()
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -DIMPLICIT_DLLEXPORT -ffree-line-length-0 -fdefault-real-8 -fdefault-double-8 -cpp")
endif()
elseif(WIN32 AND MINGW)
# Ensure static linking to avoid requiring Fortran runtime dependencies
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-0 -static-libgcc -static-libgfortran -static -fdefault-real-8 -fdefault-double-8 -cpp")
elseif (WIN32)
if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
# Ensure static linking to avoid requiring Fortran runtime dependencies
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-0 -static-libgcc -static-libgfortran -static -fdefault-real-8 -fdefault-double-8 -cpp")
elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -libs:static -free -static -fpp -real-size:64 -double-size:64")
# set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} /ffree-line-length-0 /static-libgcc /static-libgfortran /static /fdefault-real-8 /fdefault-double-8 /cpp")
endif()
endif()


Expand Down

0 comments on commit 6f25429

Please sign in to comment.