Skip to content

Commit 881c94c

Browse files
authored
Merge pull request #18 from andrew-platt/f/LinearAero
F/linear aero
2 parents f611321 + 31e7b1a commit 881c94c

File tree

8 files changed

+742
-13
lines changed

8 files changed

+742
-13
lines changed

modules/nwtc-library/CMakeLists.txt

+22-10
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,27 @@ if (CMAKE_BUILD_TYPE MATCHES Debug)
6262
set_source_files_properties(src/NetLib/slatec/dqk61.f PROPERTIES COMPILE_FLAGS -frecursive)
6363
set_source_files_properties(src/NetLib/slatec/qk61.f PROPERTIES COMPILE_FLAGS -frecursive)
6464
elseif (${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
65-
if (WIN32)
66-
set_source_files_properties(src/NetLib/slatec/NWTC_SLATEC.f90 PROPERTIES COMPILE_FLAGS "/assume:recursion")
67-
set_source_files_properties(src/NetLib/slatec/dqk61.f PROPERTIES COMPILE_FLAGS "/assume:recursion")
68-
set_source_files_properties(src/NetLib/slatec/qk61.f PROPERTIES COMPILE_FLAGS "/assume:recursion")
69-
else()
70-
set_source_files_properties(src/NetLib/slatec/NWTC_SLATEC.f90 PROPERTIES COMPILE_FLAGS "-assume recursion")
71-
set_source_files_properties(src/NetLib/slatec/dqk61.f PROPERTIES COMPILE_FLAGS "-assume recursion")
72-
set_source_files_properties(src/NetLib/slatec/qk61.f PROPERTIES COMPILE_FLAGS "-assume recursion")
65+
if("${CMAKE_Fortran_COMPILER_VERSION}" VERSION_LESS "19")
66+
if (WIN32)
67+
set_source_files_properties(src/NetLib/slatec/NWTC_SLATEC.f90 PROPERTIES COMPILE_FLAGS "/recursive")
68+
set_source_files_properties(src/NetLib/slatec/dqk61.f PROPERTIES COMPILE_FLAGS "/recursive")
69+
set_source_files_properties(src/NetLib/slatec/qk61.f PROPERTIES COMPILE_FLAGS "/recursive")
70+
else()
71+
set_source_files_properties(src/NetLib/slatec/NWTC_SLATEC.f90 PROPERTIES COMPILE_FLAGS "-recursive")
72+
set_source_files_properties(src/NetLib/slatec/dqk61.f PROPERTIES COMPILE_FLAGS "-recursive")
73+
set_source_files_properties(src/NetLib/slatec/qk61.f PROPERTIES COMPILE_FLAGS "-recursive")
74+
endif()
75+
else() # The above syntax will be deprecated after version 20. This is supported from version 19 onwards
76+
# see: https://software.intel.com/content/www/us/en/develop/documentation/fortran-compiler-developer-guide-and-reference/top/compiler-reference/compiler-options/compiler-option-details/floating-point-options/recursive.html
77+
if (WIN32)
78+
set_source_files_properties(src/NetLib/slatec/NWTC_SLATEC.f90 PROPERTIES COMPILE_FLAGS "/assume:recursion")
79+
set_source_files_properties(src/NetLib/slatec/dqk61.f PROPERTIES COMPILE_FLAGS "/assume:recursion")
80+
set_source_files_properties(src/NetLib/slatec/qk61.f PROPERTIES COMPILE_FLAGS "/assume:recursion")
81+
else()
82+
set_source_files_properties(src/NetLib/slatec/NWTC_SLATEC.f90 PROPERTIES COMPILE_FLAGS "-assume recursion")
83+
set_source_files_properties(src/NetLib/slatec/dqk61.f PROPERTIES COMPILE_FLAGS "-assume recursion")
84+
set_source_files_properties(src/NetLib/slatec/qk61.f PROPERTIES COMPILE_FLAGS "-assume recursion")
85+
endif()
7386
endif()
7487
endif()
7588
endif()
@@ -79,8 +92,7 @@ if(BUILD_OPENFAST_SIMULINK_API)
7992

8093
if (APPLE OR UNIX)
8194
if (${CMAKE_Fortran_COMPILER_ID} STREQUAL "GNU")
82-
# set(NWTC_SYS_FILE src/SysMatlabLinuxGnu.f90)
83-
message(FATAL_ERROR "SIMULINK with GNU is not yet supported.")
95+
set(NWTC_SYS_FILE src/SysMatlabLinuxGnu.f90)
8496
elseif (${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
8597
set(NWTC_SYS_FILE src/SysMatlabLinuxIntel.f90)
8698
endif()

0 commit comments

Comments
 (0)