From 3880b8ec70a193d12c397a0f13831215a951ee67 Mon Sep 17 00:00:00 2001
From: maier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Date: Mon, 22 Jul 2013 19:35:24 +0000
Subject: [PATCH] CMake: A small workaround

git-svn-id: https://svn.dealii.org/trunk@30103 0785d39b-7218-0410-832d-ea1e28bc413d
---
 deal.II/CMakeLists.txt                        | 12 +++++++++++-
 deal.II/cmake/configure/configure_1_mpi.cmake |  8 --------
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/deal.II/CMakeLists.txt b/deal.II/CMakeLists.txt
index 70f155cec6..10ee330876 100644
--- a/deal.II/CMakeLists.txt
+++ b/deal.II/CMakeLists.txt
@@ -69,7 +69,17 @@ INCLUDE(setup_cached_variables)
 # Now, set the project and set up the rest:
 #
 PROJECT(deal.II CXX)
-ENABLE_LANGUAGE(C) # OPTIONAL) wrt to bug http://public.kitware.com/Bug/view.php?id=9220
+ENABLE_LANGUAGE(C)
+
+#
+# TODO: A quick test. Refactor.
+# It would be highly appreciated to use ENABLE_LANGUAGE(... OPTIONAL) here
+# - but this is broken beyond believe up until cmake-2.11.* *sigh*
+#
+IF(ENABLE_FORTRAN)
+  ENABLE_LANGUAGE(Fortran)
+ENDIF()
+
 INCLUDE(setup_deal_ii)
 INCLUDE(setup_compiler_flags)
 
diff --git a/deal.II/cmake/configure/configure_1_mpi.cmake b/deal.II/cmake/configure/configure_1_mpi.cmake
index a441c4ab01..2b15c452c3 100644
--- a/deal.II/cmake/configure/configure_1_mpi.cmake
+++ b/deal.II/cmake/configure/configure_1_mpi.cmake
@@ -19,14 +19,6 @@
 #
 
 MACRO(FEATURE_MPI_FIND_EXTERNAL var)
-  #
-  # Enable C and Fortran support so that MPI_Fortran_LIBRARIES is set up.
-  #
-  # Disabled wrt to http://public.kitware.com/Bug/view.php?id=9220
-  #IF(NOT CMAKE_Fortran_COMPILER_WORKS)
-  #  ENABLE_LANGUAGE(Fortran OPTIONAL)
-  #ENDIF()
-
   #
   # Obey a manual user override: If MPI_CXX_FOUND is set to true in the
   # cache, we skip the FIND_PACKAGE calls:
-- 
2.39.5