-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/jk/doc/code_generator
# Conflicts: # CHANGELOG.md
- Loading branch information
Showing
25 changed files
with
329 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
include (CheckFortranSource) | ||
|
||
CHECK_FORTRAN_SOURCE_COMPILE ( | ||
${CMAKE_CURRENT_LIST_DIR}/support_for_assumed_type.F90 | ||
SUPPORT_FOR_ASSUMED_TYPE | ||
) | ||
|
||
CHECK_FORTRAN_SOURCE_COMPILE ( | ||
${CMAKE_CURRENT_LIST_DIR}/support_for_c_loc_assumed_size.F90 | ||
SUPPORT_FOR_C_LOC_ASSUMED_SIZE | ||
) | ||
|
||
CHECK_FORTRAN_SOURCE_COMPILE ( | ||
${CMAKE_CURRENT_LIST_DIR}/support_for_mpi_alloc_mem_cptr.F90 | ||
SUPPORT_FOR_MPI_ALLOC_MEM_CPTR | ||
MPI | ||
) | ||
|
||
CHECK_FORTRAN_SOURCE_COMPILE ( | ||
${CMAKE_CURRENT_LIST_DIR}/support_for_mpi_ierror_keyword.F90 | ||
SUPPORT_FOR_MPI_IERROR_KEYWORD | ||
MPI | ||
) | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
macro (CHECK_FORTRAN_SOURCE_COMPILE file var) | ||
|
||
if (NOT CMAKE_REQUIRED_QUIET) | ||
message (STATUS "Performing Test ${var}") | ||
endif () | ||
|
||
if (${ARGC} GREATER 2) | ||
try_compile ( | ||
${var} | ||
${CMAKE_BINARY_DIR} | ||
${file} | ||
CMAKE_FLAGS "-DCOMPILE_DEFINITIONS:STRING=${MPI_Fortran_FLAGS}" | ||
"-DINCLUDE_DIRECTORIES:LIST=${MPI_Fortran_INCLUDE_DIRS}" | ||
"-DLINK_LIBRARIES:LIST=${MPI_Fortran_LIBRARIES}" | ||
) | ||
else () | ||
|
||
try_compile ( | ||
${var} | ||
${CMAKE_BINARY_DIR} | ||
${file} | ||
) | ||
endif () | ||
|
||
if (${var}) | ||
if (NOT CMAKE_REQUIRED_QUIET) | ||
message(STATUS "Performing Test ${var}: SUCCESS") | ||
endif () | ||
|
||
add_definitions(-D${var}) | ||
|
||
else () | ||
|
||
if (NOT CMAKE_REQUIRED_QUIET) | ||
message(STATUS "Performing Test ${var}: FAILURE") | ||
endif () | ||
|
||
endif () | ||
|
||
endmacro (CHECK_FORTRAN_SOURCE_COMPILE) | ||
|
||
|
||
macro (CHECK_FORTRAN_SOURCE_RUN file var) | ||
|
||
if (NOT CMAKE_REQUIRED_QUIET) | ||
message (STATUS "Performing Test ${var}") | ||
endif () | ||
|
||
try_run ( | ||
code_runs | ||
code_compiles | ||
${CMAKE_BINARY_DIR} | ||
${file} | ||
) | ||
|
||
if (${code_compiles}) | ||
if (${code_runs} EQUAL 0) | ||
|
||
if (NOT CMAKE_REQUIRED_QUIET) | ||
message (STATUS "Performing Test ${var}: SUCCESS") | ||
endif () | ||
|
||
add_definitions(-D${var}) | ||
|
||
set (${var} 1) | ||
|
||
else () | ||
|
||
if (NOT CMAKE_REQUIRED_QUIET) | ||
message (STATUS "Performing Test ${var}: RUN FAILURE") | ||
endif () | ||
|
||
endif () | ||
|
||
else () | ||
|
||
if (NOT CMAKE_REQUIRED_QUIET) | ||
message (STATUS "Performing Test ${var}: BUILD FAILURE") | ||
endif () | ||
|
||
endif() | ||
|
||
endmacro (CHECK_FORTRAN_SOURCE_RUN) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
subroutine foo(x) | ||
type(*) :: x(*) | ||
end subroutine foo | ||
program main | ||
end program main |
Oops, something went wrong.