Skip to content

Commit

Permalink
Checkout develop CMakeLists for ROSCO
Browse files Browse the repository at this point in the history
  • Loading branch information
dzalkind committed Dec 14, 2021
1 parent 2c60eee commit 87a4913
Showing 1 changed file with 8 additions and 24 deletions.
32 changes: 8 additions & 24 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 All @@ -33,27 +38,6 @@ set(SOURCES
src/ReadSetParameters.f90
)

if (${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU")
if (WIN32)
set(NWTC_SYS_FILE src/SysFiles/SysGnuWin.f90)
elseif (APPLE OR UNIX OR CYGWIN)
set(NWTC_SYS_FILE src/SysFiles/SysGnuLinux.f90)
endif ()
elseif (${CMAKE_Fortran_COMPILER_ID} MATCHES "^Intel")
if (APPLE OR UNIX)
set(NWTC_SYS_FILE src/SysFiles/SysIFL.f90)
elseif (WIN32)
set(NWTC_SYS_FILE src/SysFiles/SysIVF.f90)
endif (APPLE OR UNIX)
endif ()

if (NWTC_SYS_FILE)
message("-- Setting system file as: ${NWTC_SYS_FILE}")
list(APPEND SOURCES ${NWTC_SYS_FILE})
else (NWTC_SYS_FILE)
message(FATAL_ERROR "Cannot determine system file used with NWTC_Library")
endif (NWTC_SYS_FILE)

# Library
add_library(discon SHARED ${SOURCES})

Expand Down

0 comments on commit 87a4913

Please sign in to comment.