moab-disable-fortran.patch 4.53 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bc5b0cef..a5b75198 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,24 +2,24 @@ cmake_minimum_required( VERSION 3.0 )
 SET(PACKAGE_NAME "MOAB")
 SET(PACKAGE_VERSION "5.1.1")

-if (NOT WIN32)
-  #This all breaks on windows.
-  SET(CMAKE_Fortran_COMPILER_INIT ${CMAKE_GENERATOR_FC})
-  SET(CMAKE_CXX_FLAGS_INIT "-fPIC -DPIC")
-  SET(CMAKE_CXX_FLAGS_DEBUG_INIT "-O0 -g")
-  SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
-  SET(CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
-  SET(CMAKE_C_FLAGS_INIT "-fPIC -DPIC")
-  SET(CMAKE_C_FLAGS_DEBUG_INIT "-O0 -g")
-  SET(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
-  SET(CMAKE_C_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
-  SET(CMAKE_Fortran_FLAGS_INIT "-fPIC")
-  SET(CMAKE_Fortran_FLAGS_DEBUG_INIT "-O0 -g")
-  SET(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
-  SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O2")
-  SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS_INIT "")
-  SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS_INIT "")
-endif()
+#if (NOT WIN32)
+#  #This all breaks on windows.
+#  SET(CMAKE_Fortran_COMPILER_INIT ${CMAKE_GENERATOR_FC})
+#  SET(CMAKE_CXX_FLAGS_INIT "-fPIC -DPIC")
+#  SET(CMAKE_CXX_FLAGS_DEBUG_INIT "-O0 -g")
+#  SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+#  SET(CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
+#  SET(CMAKE_C_FLAGS_INIT "-fPIC -DPIC")
+#  SET(CMAKE_C_FLAGS_DEBUG_INIT "-O0 -g")
+#  SET(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+#  SET(CMAKE_C_FLAGS_RELEASE_INIT "-O2 -DNDEBUG")
+#  SET(CMAKE_Fortran_FLAGS_INIT "-fPIC")
+#  SET(CMAKE_Fortran_FLAGS_DEBUG_INIT "-O0 -g")
+#  SET(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
+#  SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-O2")
+#  SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS_INIT "")
+#  SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS_INIT "")
+#endif()

 project( MOAB )

@@ -395,29 +395,29 @@ CONFIGURE_FILE(
     IMMEDIATE @ONLY
     )

-if (ENABLE_FORTRAN)
-  enable_language(Fortran)
-
-  # Include CMake's Fortran mangling evaluation macros
-  include(FortranCInterface)
-
-  if ("${FortranCInterface_GLOBAL_CASE}" MATCHES "UPPER")
-    set(FC_CASE "NAME")
-  else ("${FortranCInterface_GLOBAL_CASE}" MATCHES "UPPER")
-    set(FC_CASE "name")
-  endif ("${FortranCInterface_GLOBAL_CASE}" MATCHES "UPPER")
-  if (NOT "${FortranCInterface_GLOBAL_SUFFIX}" STREQUAL "")
-    set(FortranCInterface_GLOBAL_SUFFIX "## ${FortranCInterface_GLOBAL_SUFFIX}")
-  endif (NOT "${FortranCInterface_GLOBAL_SUFFIX}" STREQUAL "")
-  if (NOT "${FortranCInterface_GLOBAL__SUFFIX}" STREQUAL "")
-    set(FortranCInterface_GLOBAL__SUFFIX "## ${FortranCInterface_GLOBAL__SUFFIX}")
-  endif (NOT "${FortranCInterface_GLOBAL__SUFFIX}" STREQUAL "")
-
-  set(MOAB_F77_FUNC  "${FortranCInterface_GLOBAL_PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL_SUFFIX}")
-  set(MOAB_F77_FUNC_ "${FortranCInterface_GLOBAL__PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL__SUFFIX}")
-  set(MOAB_FC_FUNC   "${FortranCInterface_GLOBAL_PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL_SUFFIX}")
-  set(MOAB_FC_FUNC_  "${FortranCInterface_GLOBAL__PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL__SUFFIX}")
-endif (ENABLE_FORTRAN)
+  #if (ENABLE_FORTRAN)
+  #  enable_language(Fortran)
+  #
+  #  # Include CMake's Fortran mangling evaluation macros
+  #  include(FortranCInterface)
+  #
+  #  if ("${FortranCInterface_GLOBAL_CASE}" MATCHES "UPPER")
+  #    set(FC_CASE "NAME")
+  #  else ("${FortranCInterface_GLOBAL_CASE}" MATCHES "UPPER")
+  #    set(FC_CASE "name")
+  #  endif ("${FortranCInterface_GLOBAL_CASE}" MATCHES "UPPER")
+  #  if (NOT "${FortranCInterface_GLOBAL_SUFFIX}" STREQUAL "")
+  #    set(FortranCInterface_GLOBAL_SUFFIX "## ${FortranCInterface_GLOBAL_SUFFIX}")
+  #  endif (NOT "${FortranCInterface_GLOBAL_SUFFIX}" STREQUAL "")
+  #  if (NOT "${FortranCInterface_GLOBAL__SUFFIX}" STREQUAL "")
+  #    set(FortranCInterface_GLOBAL__SUFFIX "## ${FortranCInterface_GLOBAL__SUFFIX}")
+  #  endif (NOT "${FortranCInterface_GLOBAL__SUFFIX}" STREQUAL "")
+  #
+  #  set(MOAB_F77_FUNC  "${FortranCInterface_GLOBAL_PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL_SUFFIX}")
+  #  set(MOAB_F77_FUNC_ "${FortranCInterface_GLOBAL__PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL__SUFFIX}")
+  #  set(MOAB_FC_FUNC   "${FortranCInterface_GLOBAL_PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL_SUFFIX}")
+  #  set(MOAB_FC_FUNC_  "${FortranCInterface_GLOBAL__PREFIX} ${FC_CASE} ${FortranCInterface_GLOBAL__SUFFIX}")
+  #endif (ENABLE_FORTRAN)

 # Generate the CMake input header file and then pass it through configuration
 ## execute_process( COMMAND cat MOABConfig.h.in COMMAND sed -e "s/#undef /#cmakedefine MOAB_/g"