diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 68f5bca9eaa4941f610bccd21c4cc487e2d6c239..44f4fc4694e113423c8cf3f198fb5050505d4a48 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,5 +1,8 @@
 add_subdirectory(unit)
 if(CM_ALL_TESTS_INTEGRATION)
+    if(NOT CM_ALL_FORTRAN)
+        message(FATAL_ERROR "Feature tests are only available if Fortran is enabled as well")
+    endif()
     add_subdirectory(feature)
 endif()
 if(CM_ALL_FORTRAN)