forked from njoy/ACEtk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request njoy#25 in SCL/cmake from feature/fortran_options …
…to master * commit '4940f27875983f4cf2973707134f5138b46312a2': (21 commits) Fixed error when removing dead code Remove dead code in IntelWarn.cmake Modified IntelDiagDisable and IntelWarn deleted orphaned file Testing updated to work with WIN32 Explicit testing for compliers with 'NULL' result Alternative impl for TempArrayHeapAlloc updated testing directory Generalized Fortran Standard work and updated tests Fixed broken previous commit moved files Modified TempArrayHeapAlloc to use target property Removed unused TempArrayHeapAlloc files Created highest level testing CMakeLists.txt Added test to TempArrayHeapAlloc.cmake to prevent generating same target Update Intel-specific tests for other compilers Add tests for Backtrace, Standard2008, & FreeForm Added IntelDiagDisable and IntelWarn tests Added Fortran_IntelWarn interface Added target to disable Intel diagnostics ...
- Loading branch information
Showing
63 changed files
with
460 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
include(Backports/IncludeGuard) | ||
include_guard(GLOBAL) | ||
|
||
add_library(Fortran_Backtrace INTERFACE) | ||
add_library(FortranCompileOptions::Backtrace ALIAS Fortran_Backtrace) | ||
|
||
include(FortranCompileOptions/Backtrace/Intel) | ||
include(FortranCompileOptions/Backtrace/PGI) | ||
# traceback with GNU is default | ||
# traceback with Flang is default |
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,7 @@ | ||
string(CONCAT generator | ||
"$<$<STREQUAL:Intel,${CMAKE_Fortran_COMPILER_ID}>:" | ||
"$<$<NOT:$<PLATFORM_ID:Windows>>:-traceback>" | ||
"$<$<PLATFORM_ID:Windows>:/traceback>>" | ||
) | ||
|
||
target_compile_options(Fortran_Backtrace INTERFACE ${generator}) |
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 @@ | ||
string(CONCAT generator | ||
"$<$<STREQUAL:PGI,${CMAKE_Fortran_COMPILER_ID}>:-traceback>" | ||
) | ||
|
||
target_compile_options(Fortran_Backtrace INTERFACE ${generator}) |
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,10 @@ | ||
include(Backports/IncludeGuard) | ||
include_guard(GLOBAL) | ||
|
||
add_library(Fortran_FreeForm INTERFACE) | ||
add_library(FortranCompileOptions::FreeForm ALIAS Fortran_FreeForm) | ||
|
||
include(FortranCompileOptions/FreeForm/Intel) | ||
include(FortranCompileOptions/FreeForm/GNU) | ||
include(FortranCompileOptions/FreeForm/Flang) | ||
include(FortranCompileOptions/FreeForm/PGI) |
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 @@ | ||
string(CONCAT generator | ||
"$<$<STREQUAL:Flang,${CMAKE_Fortran_COMPILER_ID}>:-ffree-form>" | ||
) | ||
|
||
target_compile_options(Fortran_FreeForm INTERFACE ${generator}) |
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 @@ | ||
string(CONCAT generator | ||
"$<$<STREQUAL:GNU,${CMAKE_Fortran_COMPILER_ID}>:-ffree-form>" | ||
) | ||
|
||
target_compile_options(Fortran_FreeForm INTERFACE ${generator}) |
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,7 @@ | ||
string(CONCAT generator | ||
"$<$<STREQUAL:Intel,${CMAKE_Fortran_COMPILER_ID}>:" | ||
"$<$<NOT:$<PLATFORM_ID:Windows>>:-free>" | ||
"$<$<PLATFORM_ID:Windows>:/free>>" | ||
) | ||
|
||
target_compile_options(Fortran_FreeForm INTERFACE ${generator}) |
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 @@ | ||
string(CONCAT generator | ||
"$<$<STREQUAL:PGI,${CMAKE_Fortran_COMPILER_ID}>:-Mfree>" | ||
) | ||
|
||
target_compile_options(Fortran_FreeForm INTERFACE ${generator}) |
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,21 @@ | ||
include(Backports/IncludeGuard) | ||
include_guard(GLOBAL) | ||
|
||
if( "Intel" STREQUAL "${CMAKE_Fortran_COMPILER_ID}") | ||
set(Fortran.Intel.DiagDisable "" CACHE STRING "semicolon-separated list of Intel Fortran diagnostic numbers to dissable") | ||
mark_as_advanced(Fortran.Intel.DiagDisable) | ||
endif() | ||
|
||
add_library(Fortran_IntelDiagDisable INTERFACE) | ||
add_library(FortranCompileOptions::IntelDiagDisable ALIAS Fortran_IntelDiagDisable) | ||
|
||
string(CONCAT generator | ||
"$<$<BOOL:$<JOIN:${Fortran.Intel.DiagDisable},>>:" | ||
"$<$<STREQUAL:Intel,${CMAKE_Fortran_COMPILER_ID}>:" | ||
"$<$<NOT:$<PLATFORM_ID:Windows>>:-diag-disable;$<JOIN:${Fortran.Intel.DiagDisable},$<COMMA>>>" | ||
"$<$<PLATFORM_ID:Windows>:/Qdiag-disable:$<JOIN:${Fortran.Intel.DiagDisable},$<COMMA>>>" | ||
">" | ||
">" | ||
) | ||
|
||
target_compile_options(Fortran_IntelDiagDisable INTERFACE ${generator}) |
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,21 @@ | ||
include(Backports/IncludeGuard) | ||
include_guard(GLOBAL) | ||
|
||
if( "Intel" STREQUAL "${CMAKE_Fortran_COMPILER_ID}") | ||
set(Fortran.Intel.Warn "" CACHE STRING "semicolon-separated list of Intel Fortran warning keyword") | ||
mark_as_advanced(Fortran.Intel.Warn) | ||
endif() | ||
|
||
add_library(Fortran_IntelWarn INTERFACE) | ||
add_library(FortranCompileOptions::IntelWarn ALIAS Fortran_IntelWarn) | ||
|
||
string(CONCAT generator | ||
"$<$<BOOL:$<JOIN:${Fortran.Intel.Warn},>>:" | ||
"$<$<STREQUAL:Intel,${CMAKE_Fortran_COMPILER_ID}>:" | ||
"$<$<NOT:$<PLATFORM_ID:Windows>>:-warn;$<JOIN:${Fortran.Intel.Warn},$<COMMA>>>" | ||
"$<$<PLATFORM_ID:Windows>:/warn:$<JOIN:${Fortran.Intel.Warn},$<COMMA>>>" | ||
">" | ||
">" | ||
) | ||
|
||
target_compile_options(Fortran_IntelWarn INTERFACE ${generator}) |
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,21 @@ | ||
include(Backports/IncludeGuard) | ||
include_guard(GLOBAL) | ||
|
||
define_property(TARGET PROPERTY Fortran_Standard | ||
BRIEF_DOCS | ||
"The Fortran standard whose features are requested to build this target." | ||
FULL_DOCS | ||
"This property specifies the Fortran standard whose features are requested to | ||
build this target. For some compilers, this results in adding a flag such as | ||
-std=f2003 to the compile line. For compilers that have no notion of a | ||
standard level, such as PGI, this has no effect. | ||
Supported values are 95, 2003, and 2008") | ||
|
||
add_library(Fortran_Standard INTERFACE) | ||
add_library(FortranCompileOptions::Standard ALIAS Fortran_Standard) | ||
|
||
include(FortranCompileOptions/Standard/Intel) | ||
include(FortranCompileOptions/Standard/GNU) | ||
include(FortranCompileOptions/Standard/PGI) | ||
# TODO: Flang -- it does not implement standards checking yet |
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 @@ | ||
string(CONCAT generator | ||
"$<$<STREQUAL:$<TARGET_PROPERTY:Fortran_Standard>,95>:f95>" | ||
"$<$<STREQUAL:$<TARGET_PROPERTY:Fortran_Standard>,2003>:f2003>" | ||
"$<$<STREQUAL:$<TARGET_PROPERTY:Fortran_Standard>,2008>:f2008>") | ||
|
||
string(CONCAT generator | ||
"$<$<STREQUAL:GNU,${CMAKE_Fortran_COMPILER_ID}>:-std=${generator}>") | ||
|
||
target_compile_options(Fortran_Standard INTERFACE ${generator}) |
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,12 @@ | ||
string(CONCAT generator | ||
"$<$<STREQUAL:$<TARGET_PROPERTY:Fortran_Standard>,95>:f95>" | ||
"$<$<STREQUAL:$<TARGET_PROPERTY:Fortran_Standard>,2003>:f03>" | ||
"$<$<STREQUAL:$<TARGET_PROPERTY:Fortran_Standard>,2008>:f08>") | ||
|
||
string(CONCAT generator | ||
"$<$<STREQUAL:Intel,${CMAKE_Fortran_COMPILER_ID}>:" | ||
"$<$<NOT:$<PLATFORM_ID:Windows>>:-stand;${generator}>" | ||
"$<$<PLATFORM_ID:Windows>:/stand:${generator}>>" | ||
) | ||
|
||
target_compile_options(Fortran_Standard INTERFACE ${generator}) |
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,8 @@ | ||
# PGI cannot check for particular standard, so we check for general standard | ||
# compliance | ||
|
||
string(CONCAT generator | ||
"$<$<STREQUAL:PGI,${CMAKE_Fortran_COMPILER_ID}>:-Mstandard>" | ||
) | ||
|
||
target_compile_options(Fortran_Standard INTERFACE ${generator}) |
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,18 @@ | ||
include(Backports/IncludeGuard) | ||
include_guard(GLOBAL) | ||
|
||
define_property(TARGET PROPERTY Fortran_TempArrayHeapAlloc_THRESHOLD | ||
BRIEF_DOCS | ||
"A threshold (in kilobytes) above which temporary and automatic arrays should be heap allocated" | ||
FULL_DOCS | ||
"A threshold (in kilobytes) above which temporary and automatic arrays should be heap allocated" | ||
) | ||
|
||
|
||
add_library(Fortran_TempArrayHeapAlloc INTERFACE) | ||
add_library(FortranCompileOptions::TempArrayHeapAlloc ALIAS Fortran_TempArrayHeapAlloc) | ||
|
||
include(FortranCompileOptions/TempArrayHeapAlloc/GNU) | ||
include(FortranCompileOptions/TempArrayHeapAlloc/Flang) | ||
include(FortranCompileOptions/TempArrayHeapAlloc/Intel) | ||
include(FortranCompileOptions/TempArrayHeapAlloc/PGI) |
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 @@ | ||
string(CONCAT generator | ||
"$<$<STREQUAL:Flang,${CMAKE_Fortran_COMPILER_ID}>" | ||
":$<$<BOOL:$<TARGET_PROPERTY:Fortran_TempArrayHeapAlloc_THRESHOLD>>" | ||
":-fmax-stack-var-size=$<TARGET_PROPERTY:Fortran_TempArrayHeapAlloc_THRESHOLD>000" | ||
">" | ||
">" | ||
) | ||
|
||
target_compile_options(Fortran_TempArrayHeapAlloc INTERFACE ${generator}) |
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 @@ | ||
string(CONCAT generator | ||
"$<$<STREQUAL:GNU,${CMAKE_Fortran_COMPILER_ID}>" | ||
":$<$<BOOL:$<TARGET_PROPERTY:Fortran_TempArrayHeapAlloc_THRESHOLD>>" | ||
":-fmax-stack-var-size=$<TARGET_PROPERTY:Fortran_TempArrayHeapAlloc_THRESHOLD>000" | ||
">" | ||
">" | ||
) | ||
|
||
target_compile_options(Fortran_TempArrayHeapAlloc INTERFACE ${generator}) |
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,10 @@ | ||
string(CONCAT generator | ||
"$<$<STREQUAL:Intel,${CMAKE_Fortran_COMPILER_ID}>" | ||
":$<$<BOOL:$<TARGET_PROPERTY:Fortran_TempArrayHeapAlloc_THRESHOLD>>" | ||
":$<$<NOT:$<PLATFORM_ID:Windows>>:-heap-arrays;$<TARGET_PROPERTY:Fortran_TempArrayHeapAlloc_THRESHOLD>>" | ||
"$<$<PLATFORM_ID:Windows>:/heap-arrays:$<TARGET_PROPERTY:Fortran_TempArrayHeapAlloc_THRESHOLD>>" | ||
">" | ||
">" | ||
) | ||
|
||
target_compile_options(Fortran_TempArrayHeapAlloc INTERFACE ${generator}) |
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,2 @@ | ||
target_compile_options(Fortran_TempArrayHeapAlloc INTERFACE | ||
"$<$<STREQUAL:PGI,${CMAKE_Fortran_COMPILER_ID}>:-Mnostack_arrays>") |
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 @@ | ||
cmake_minimum_required(VERSION 3.2.0) | ||
project(shacl_cmake LANGUAGES Fortran VERSION 1.0.0) | ||
|
||
include(CTest) | ||
|
||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/..) | ||
|
||
add_subdirectory(FortranCompileOptions) | ||
|
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,32 @@ | ||
include(FortranCompileOptions/Backtrace) | ||
|
||
file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/use_backtrace.f90 | ||
INPUT ${CMAKE_CURRENT_LIST_DIR}/use_backtrace.f90.in | ||
) | ||
|
||
add_executable(use_backtrace ${CMAKE_CURRENT_BINARY_DIR}/use_backtrace.f90) | ||
target_link_libraries(use_backtrace PRIVATE FortranCompileOptions::Backtrace) | ||
|
||
add_custom_target(run_use_backtrace ALL | ||
COMMAND use_backtrace | ||
) | ||
add_dependencies(run_use_backtrace use_backtrace) | ||
|
||
if( WIN32 ) | ||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/terminal_output_${CMAKE_Fortran_COMPILER_ID}_win32 | ||
${CMAKE_CURRENT_BINARY_DIR}/terminal_output_${CMAKE_Fortran_COMPILER_ID}_win32 | ||
NEWLINE_STYLE DOS | ||
) | ||
|
||
add_test(NAME run_use_backtrace | ||
COMMAND ${CMAKE_COMMAND} -E compare_files | ||
${CMAKE_CURRENT_BINARY_DIR}/terminal_output | ||
${CMAKE_CURRENT_BINARY_DIR}/terminal_output_${CMAKE_Fortran_COMPILER_ID}_win32 | ||
) | ||
else() | ||
add_test(NAME run_use_backtrace | ||
COMMAND ${CMAKE_COMMAND} -E compare_files | ||
${CMAKE_CURRENT_BINARY_DIR}/terminal_output | ||
${CMAKE_CURRENT_SOURCE_DIR}/terminal_output_${CMAKE_Fortran_COMPILER_ID} | ||
) | ||
endif() |
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 @@ | ||
|
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 @@ | ||
|
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 @@ | ||
-traceback |
1 change: 1 addition & 0 deletions
1
tests/FortranCompileOptions/Backtrace/terminal_output_Intel_win32
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 @@ | ||
/traceback |
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 @@ | ||
-traceback |
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 @@ | ||
program use_standard_semantics | ||
open(unit=42,file="terminal_output",status="unknown") | ||
write(42,*) "$<TARGET_PROPERTY:use_backtrace,COMPILE_OPTIONS>" | ||
close(42) | ||
end program |
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,6 @@ | ||
add_subdirectory(Backtrace) | ||
add_subdirectory(FreeForm) | ||
add_subdirectory(IntelDiagDisable) | ||
add_subdirectory(IntelWarn) | ||
add_subdirectory(Standard) | ||
add_subdirectory(TempArrayHeapAlloc) |
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,32 @@ | ||
include(FortranCompileOptions/FreeForm) | ||
|
||
file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/use_free_form.f90 | ||
INPUT ${CMAKE_CURRENT_LIST_DIR}/use_free_form.f90.in | ||
) | ||
|
||
add_executable(use_free_form ${CMAKE_CURRENT_BINARY_DIR}/use_free_form.f90) | ||
target_link_libraries(use_free_form PRIVATE FortranCompileOptions::FreeForm) | ||
|
||
add_custom_target(run_use_free_form ALL | ||
COMMAND use_free_form | ||
) | ||
add_dependencies(run_use_free_form use_free_form) | ||
|
||
if( WIN32 ) | ||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/terminal_output_${CMAKE_Fortran_COMPILER_ID}_win32 | ||
${CMAKE_CURRENT_BINARY_DIR}/terminal_output_${CMAKE_Fortran_COMPILER_ID}_win32 | ||
NEWLINE_STYLE DOS | ||
) | ||
|
||
add_test(NAME run_use_free_form | ||
COMMAND ${CMAKE_COMMAND} -E compare_files | ||
${CMAKE_CURRENT_BINARY_DIR}/terminal_output | ||
${CMAKE_CURRENT_BINARY_DIR}/terminal_output_${CMAKE_Fortran_COMPILER_ID}_win32 | ||
) | ||
else() | ||
add_test(NAME run_use_free_form | ||
COMMAND ${CMAKE_COMMAND} -E compare_files | ||
${CMAKE_CURRENT_BINARY_DIR}/terminal_output | ||
${CMAKE_CURRENT_SOURCE_DIR}/terminal_output_${CMAKE_Fortran_COMPILER_ID} | ||
) | ||
endif() |
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 @@ | ||
-ffree-form |
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 @@ | ||
-ffree-form |
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 @@ | ||
-free |
1 change: 1 addition & 0 deletions
1
tests/FortranCompileOptions/FreeForm/terminal_output_Intel_win32
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 @@ | ||
/free |
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 @@ | ||
-Mfree |
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 @@ | ||
program use_standard_semantics | ||
open(unit=42,file="terminal_output",status="unknown") | ||
write(42,*) "$<TARGET_PROPERTY:use_free_form,COMPILE_OPTIONS>" | ||
close(42) | ||
end program |
33 changes: 33 additions & 0 deletions
33
tests/FortranCompileOptions/IntelDiagDisable/CMakeLists.txt
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,33 @@ | ||
set(Fortran.Intel.DiagDisable "1138;1138" CACHE STRING "") | ||
include(FortranCompileOptions/IntelDiagDisable) | ||
|
||
file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/use_intel_diag_disable.f90 | ||
INPUT ${CMAKE_CURRENT_LIST_DIR}/use_intel_diag_disable.f90.in | ||
) | ||
|
||
add_executable(use_intel_diag_disable ${CMAKE_CURRENT_BINARY_DIR}/use_intel_diag_disable.f90) | ||
target_link_libraries(use_intel_diag_disable PRIVATE FortranCompileOptions::IntelDiagDisable) | ||
|
||
add_custom_target(run_use_intel_diag_disable ALL | ||
COMMAND use_intel_diag_disable | ||
) | ||
add_dependencies(run_use_intel_diag_disable use_intel_diag_disable) | ||
|
||
if( WIN32 ) | ||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/terminal_output_${CMAKE_Fortran_COMPILER_ID}_win32 | ||
${CMAKE_CURRENT_BINARY_DIR}/terminal_output_${CMAKE_Fortran_COMPILER_ID}_win32 | ||
NEWLINE_STYLE DOS | ||
) | ||
|
||
add_test(NAME run_use_intel_diag_disable | ||
COMMAND ${CMAKE_COMMAND} -E compare_files | ||
${CMAKE_CURRENT_BINARY_DIR}/terminal_output | ||
${CMAKE_CURRENT_BINARY_DIR}/terminal_output_${CMAKE_Fortran_COMPILER_ID}_win32 | ||
) | ||
else() | ||
add_test(NAME run_use_intel_diag_disable | ||
COMMAND ${CMAKE_COMMAND} -E compare_files | ||
${CMAKE_CURRENT_BINARY_DIR}/terminal_output | ||
${CMAKE_CURRENT_SOURCE_DIR}/terminal_output_${CMAKE_Fortran_COMPILER_ID} | ||
) | ||
endif() |
1 change: 1 addition & 0 deletions
1
tests/FortranCompileOptions/IntelDiagDisable/terminal_output_Flang
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 @@ | ||
|
1 change: 1 addition & 0 deletions
1
tests/FortranCompileOptions/IntelDiagDisable/terminal_output_GNU
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 @@ | ||
|
1 change: 1 addition & 0 deletions
1
tests/FortranCompileOptions/IntelDiagDisable/terminal_output_Intel
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 @@ | ||
-diag-disable;1138,1138 |
1 change: 1 addition & 0 deletions
1
tests/FortranCompileOptions/IntelDiagDisable/terminal_output_Intel_win32
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 @@ | ||
/Qdiag-disable:1138,1138 |
1 change: 1 addition & 0 deletions
1
tests/FortranCompileOptions/IntelDiagDisable/terminal_output_PGI
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 changes: 5 additions & 0 deletions
5
tests/FortranCompileOptions/IntelDiagDisable/use_intel_diag_disable.f90.in
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 @@ | ||
program use_standard_semantics | ||
open(unit=42,file="terminal_output",status="unknown") | ||
write(42,*) "$<TARGET_PROPERTY:use_intel_diag_disable,COMPILE_OPTIONS>" | ||
close(42) | ||
end program |
Oops, something went wrong.