@@ -16,16 +16,19 @@ message( STATUS "Running with CMake from: ${CMAKE_COMMAND}" )
1616message ( STATUS "Current source dir (for OpenCoarrays): ${CMAKE_CURRENT_SOURCE_DIR} " )
1717
1818# 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 ()
1923if ($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 )
2325endif ()
26+ option (CAF_RUN_DEVELOPER_TESTS "Run tests intended only for developers" ${_TF} )
2427mark_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} )
2531
26- if ( NOT DEFINED ENV{OPENCOARRAYS_DEVELOPER})
27- set ( ENV{OPENCOARRAYS_DEVELOPER} FALSE )
28- endif ()
2932
3033# Name project and specify source languages
3134# Parse version from .VERSION file so that more info can be added and easier to get from scripts
@@ -842,9 +845,17 @@ endif()
842845include (cmake/AddInstallationScriptTest.cmake )
843846add_installation_script_test(installation-scripts.sh src/tests/installation/)
844847
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+
845857# 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} ) )
848859 # See https://github.com/sourceryinstitute/OpenCoarrays/issues/523#issuecomment-401613209
849860 add_test (NAME ISO_Fortran_binding_tests COMMAND "${CMAKE_RUNTIME_OUTPUT_DIRECTORY} /ISO_Fortran_binding_tests" )
850861endif ()
0 commit comments