Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BugFix] cmake configuration for Linux + Intel + Debug #547

Merged
merged 3 commits into from
Sep 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 21 additions & 8 deletions modules/nwtc-library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,27 @@ if (CMAKE_BUILD_TYPE MATCHES Debug)
set_source_files_properties(src/NetLib/slatec/dqk61.f PROPERTIES COMPILE_FLAGS -frecursive)
set_source_files_properties(src/NetLib/slatec/qk61.f PROPERTIES COMPILE_FLAGS -frecursive)
elseif (${CMAKE_Fortran_COMPILER_ID} STREQUAL "Intel")
if (WIN32)
set_source_files_properties(src/NetLib/slatec/NWTC_SLATEC.f90 PROPERTIES COMPILE_FLAGS "/assume:recursion")
set_source_files_properties(src/NetLib/slatec/dqk61.f PROPERTIES COMPILE_FLAGS "/assume:recursion")
set_source_files_properties(src/NetLib/slatec/qk61.f PROPERTIES COMPILE_FLAGS "/assume:recursion")
else()
set_source_files_properties(src/NetLib/slatec/NWTC_SLATEC.f90 PROPERTIES COMPILE_FLAGS "-assume recursion")
set_source_files_properties(src/NetLib/slatec/dqk61.f PROPERTIES COMPILE_FLAGS "-assume recursion")
set_source_files_properties(src/NetLib/slatec/qk61.f PROPERTIES COMPILE_FLAGS "-assume recursion")
if("${CMAKE_Fortran_COMPILER_VERSION}" VERSION_LESS "19")
if (WIN32)
set_source_files_properties(src/NetLib/slatec/NWTC_SLATEC.f90 PROPERTIES COMPILE_FLAGS "/recursive")
set_source_files_properties(src/NetLib/slatec/dqk61.f PROPERTIES COMPILE_FLAGS "/recursive")
set_source_files_properties(src/NetLib/slatec/qk61.f PROPERTIES COMPILE_FLAGS "/recursive")
else()
set_source_files_properties(src/NetLib/slatec/NWTC_SLATEC.f90 PROPERTIES COMPILE_FLAGS "-recursive")
set_source_files_properties(src/NetLib/slatec/dqk61.f PROPERTIES COMPILE_FLAGS "-recursive")
set_source_files_properties(src/NetLib/slatec/qk61.f PROPERTIES COMPILE_FLAGS "-recursive")
endif()
else() # The above syntax will be deprecated after version 20. This is supported from version 19 onwards
# 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
if (WIN32)
set_source_files_properties(src/NetLib/slatec/NWTC_SLATEC.f90 PROPERTIES COMPILE_FLAGS "/assume:recursion")
set_source_files_properties(src/NetLib/slatec/dqk61.f PROPERTIES COMPILE_FLAGS "/assume:recursion")
set_source_files_properties(src/NetLib/slatec/qk61.f PROPERTIES COMPILE_FLAGS "/assume:recursion")
else()
set_source_files_properties(src/NetLib/slatec/NWTC_SLATEC.f90 PROPERTIES COMPILE_FLAGS "-assume recursion")
set_source_files_properties(src/NetLib/slatec/dqk61.f PROPERTIES COMPILE_FLAGS "-assume recursion")
set_source_files_properties(src/NetLib/slatec/qk61.f PROPERTIES COMPILE_FLAGS "-assume recursion")
endif()
endif()
endif()
endif()
Expand Down