-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
45 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) | ||
|
||
check_source_compiles(Fortran "subroutine poly(A) | ||
intrinsic :: rank | ||
real, intent(in) :: A(:) | ||
real :: B(rank(A)) | ||
B = A | ||
end subroutine" | ||
f2018rank) |
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,29 @@ | ||
set(j "{}") | ||
|
||
foreach(s IN LISTS f2003features f2008features f2018features f2023features) | ||
foreach(f IN LISTS s) | ||
if(${f}) | ||
set(hasf true) | ||
else() | ||
set(hasf false) | ||
endif() | ||
|
||
string(JSON j SET ${j} ${f} ${hasf}) | ||
endforeach() | ||
endforeach() | ||
|
||
|
||
string(JSON j SET ${j} compiler "{}") | ||
string(JSON j SET ${j} compiler vendor \"${CMAKE_Fortran_COMPILER_ID}\") | ||
string(JSON j SET ${j} compiler version \"${CMAKE_Fortran_COMPILER_VERSION}\") | ||
string(JSON j SET ${j} compiler system \"${CMAKE_SYSTEM_NAME}\") | ||
string(JSON j SET ${j} compiler system_version \"${CMAKE_SYSTEM_VERSION}\") | ||
string(JSON j SET ${j} compiler target \"${CMAKE_SYSTEM_PROCESSOR}\") | ||
string(JSON j SET ${j} compiler flags \"${CMAKE_Fortran_FLAGS}\") | ||
string(JSON j SET ${j} compiler sysroot \"${CMAKE_OSX_SYSROOT}\") | ||
|
||
set(feature_file ${CMAKE_CURRENT_BINARY_DIR}/features.json) | ||
|
||
file(WRITE ${feature_file} ${j}) | ||
|
||
message(STATUS "See ${feature_file} for features enabled") |