@@ -16,16 +16,19 @@ message( STATUS "Running with CMake from: ${CMAKE_COMMAND}" )
16
16
message ( STATUS "Current source dir (for OpenCoarrays): ${CMAKE_CURRENT_SOURCE_DIR} " )
17
17
18
18
# Add option and check environment to determine if developer tests should be run
19
+ set ( _TF OFF )
20
+ if ( NOT DEFINED ENV{OPENCOARRAYS_DEVELOPER} )
21
+ set ( ENV{OPENCOARRAYS_DEVELOPER} FALSE )
22
+ endif ()
19
23
if ($ENV{OPENCOARRAYS_DEVELOPER} )
20
- option (CAF_RUN_DEVELOPER_TESTS "Run tests intended only for developers" ON )
21
- else ()
22
- option (CAF_RUN_DEVELOPER_TESTS "Run tests intended only for developers" OFF )
24
+ set ( _TF ON )
23
25
endif ()
26
+ option (CAF_RUN_DEVELOPER_TESTS "Run tests intended only for developers" ${_TF} )
24
27
mark_as_advanced (CAF_RUN_DEVELOPER_TESTS )
28
+ option ( CAF_ENABLE_ISO_Fortran_BINDING
29
+ "Build and install F2018 C interop iso_fortran_binding.h header; experimental!"
30
+ ${_TF} )
25
31
26
- if ( NOT DEFINED ENV{OPENCOARRAYS_DEVELOPER} )
27
- set ( ENV{OPENCOARRAYS_DEVELOPER} FALSE )
28
- endif ()
29
32
30
33
# Name project and specify source languages
31
34
# Parse version from .VERSION file so that more info can be added and easier to get from scripts
@@ -842,9 +845,17 @@ endif()
842
845
include (cmake/AddInstallationScriptTest.cmake )
843
846
add_installation_script_test (installation-scripts.sh src/tests/installation/ )
844
847
848
+ if ( CAF_ENABLE_FAILED_IMAGES AND ( NOT
849
+ ( "${CMAKE_C_COMPILER_ID} " STREQUAL "GNU" ) AND ( "${CMAKE_SYSTEM_PROCESSOR} " STREQUAL "x86_64" ) )
850
+ )
851
+ message ( WARNING
852
+ "ISO_Fortran_BINDING has only been tested with recent GCC C compilers on x86_64 architectures!
853
+ Some people have reported problems on other architectures or using other C compilers (Clang).
854
+ There are likely bugs present; use at your own risk!" )
855
+ endif ()
856
+
845
857
# Test ISO_Fortran_binding library
846
- if ( (( "${CMAKE_C_COMPILER_ID} " STREQUAL "GNU" ) AND ( "${CMAKE_SYSTEM_PROCESSOR} " STREQUAL "x86_64" ))
847
- OR ( CAF_RUN_DEVELOPER_TESTS OR $ENV{OPENCOARRAYS_DEVELOPER} ) )
858
+ if ( CAF_ENABLE_ISO_Fortran_BINDING OR ( CAF_RUN_DEVELOPER_TESTS OR $ENV{OPENCOARRAYS_DEVELOPER} ) )
848
859
# See https://github.com/sourceryinstitute/OpenCoarrays/issues/523#issuecomment-401613209
849
860
add_test (NAME ISO_Fortran_binding_tests COMMAND "${CMAKE_RUNTIME_OUTPUT_DIRECTORY} /ISO_Fortran_binding_tests" )
850
861
endif ()
0 commit comments