From f5c8eab3d513eb59217187057eab502c8b3116d8 Mon Sep 17 00:00:00 2001
From: maier
Date: Tue, 15 Oct 2013 21:05:24 +0000
Subject: [PATCH] Add support for Cygwin64
git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@31244 0785d39b-7218-0410-832d-ea1e28bc413d
---
.../checks/check_02_system_features.cmake | 33 ++-----------------
deal.II/doc/readme.html | 21 +++++-------
deal.II/include/deal.II/base/geometry_info.h | 6 ++++
deal.II/source/base/geometry_info.cc | 8 ++++-
4 files changed, 25 insertions(+), 43 deletions(-)
diff --git a/deal.II/cmake/checks/check_02_system_features.cmake b/deal.II/cmake/checks/check_02_system_features.cmake
index 22e6a8a88b..7980378ed2 100644
--- a/deal.II/cmake/checks/check_02_system_features.cmake
+++ b/deal.II/cmake/checks/check_02_system_features.cmake
@@ -119,49 +119,22 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
# Shared library handling:
#
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
- #
# With MinGW we're lucky:
- #
ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-Wl,--export-all-symbols")
ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-Wl,--enable-auto-import")
ENABLE_IF_LINKS(DEAL_II_LINKER_FLAGS "-Wl,--allow-multiple-definition")
-
- #
- # Workaround for a miscompilation and linkage issue with shared libraries
- # with MinGW. Replacing -O0 with -O1 seems to help..
- #
- REPLACE_FLAG(DEAL_II_CXX_FLAGS_DEBUG "-O0" "-O1")
-
ELSE()
-
- #
# Otherwise disable shared libraries:
- #
MESSAGE(WARNING "\n"
"BUILD_SHARED_LIBS forced to OFF\n\n"
)
SET(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
ENDIF()
- #
- # Disable -ggdb and -g on Windows/MinGW targets for the moment until the
- # compilation issues with too big files are resolved
- #
- # - Matthias Maier, 2012
- #
- STRIP_FLAG(DEAL_II_CXX_FLAGS_DEBUG "-ggdb")
- STRIP_FLAG(DEAL_II_LINKER_FLAGS_DEBUG "-ggdb")
- STRIP_FLAG(DEAL_II_CXX_FLAGS_DEBUG "-g")
- STRIP_FLAG(DEAL_II_LINKER_FLAGS_DEBUG "-g")
ENDIF()
-IF(CMAKE_SYSTEM_NAME MATCHES "CYGWIN")
- #
- # Workaround for a miscompilation and linkage issue with shared libraries
- # under Cygwin. Replacing -O0 with -O1 helps.
- #
- # - Matthias Maier, 2013
- #
- REPLACE_FLAG(DEAL_II_CXX_FLAGS_DEBUG "-O0" "-O1")
+IF( CMAKE_SYSTEM_NAME MATCHES "CYGWIN"
+ OR CMAKE_SYSTEM_NAME MATCHES "Windows" )
+ # TODO: Bailout if current compiler is not gcc-4.8.1 or newer
ENDIF()
diff --git a/deal.II/doc/readme.html b/deal.II/doc/readme.html
index 33531d51b9..36e6226be7 100644
--- a/deal.II/doc/readme.html
+++ b/deal.II/doc/readme.html
@@ -78,11 +78,15 @@
platforms:
- - GNU/Linux: GCC version 4.1 or later;
- Clang version 3.0 or later; ICC version 12 or later
- - Mac OS X: GCC version 4.0 or later; Clang version 3.0 or later
- (Please see the deal.II Wiki for installation issues)
+ - GNU/Linux: GCC version 4.1 or later; Clang version 3.0 or later;
+ ICC versions 12* or 14* (version 13 is not supported)
+ - Mac OS X: GCC version 4.1 or later; Clang version 3.0 or later.
+ Please see the deal.II Wiki for installation instructions.
+ - Windows: Cygwin64 with gcc-4.8.1 (Cygwin32 is not supported).
+ Please see the deal.II Wiki for installation instructions.
+
@@ -92,13 +96,6 @@
- Windows support is currently highly experimental. For installing on Windows, please refer to additional
- information on the deal.II Wiki and have a look at the bug
- tracker!
Please note that the Microsoft Visual C++ compiler, that is widely
used on Microsoft Windows, is not supported. If you need a native
Windows target, use the MinGW compiler instead.
diff --git a/deal.II/include/deal.II/base/geometry_info.h b/deal.II/include/deal.II/base/geometry_info.h
index ced3b187de..ea6d4b11f1 100644
--- a/deal.II/include/deal.II/base/geometry_info.h
+++ b/deal.II/include/deal.II/base/geometry_info.h
@@ -1457,7 +1457,13 @@ struct GeometryInfo
/**
* Number of vertices of a cell.
*/
+#ifdef DEAL_II_USE_CXX11
+ // Workaround for some versions of gcc-4.8.1 (notably on Cygwin and Mac)
+ // that incorrectly fail to deduce the second version as a constexpr
+ static constexpr unsigned int vertices_per_cell = 1 << dim;
+#else
static const unsigned int vertices_per_cell = 1 << dim;
+#endif
/**
* Number of vertices on each
diff --git a/deal.II/source/base/geometry_info.cc b/deal.II/source/base/geometry_info.cc
index 6569451117..5765bb6826 100644
--- a/deal.II/source/base/geometry_info.cc
+++ b/deal.II/source/base/geometry_info.cc
@@ -31,7 +31,13 @@ GeometryInfo<0>::n_children(const RefinementCase<0> &)
template const unsigned int GeometryInfo::max_children_per_cell;
template const unsigned int GeometryInfo::faces_per_cell;
template const unsigned int GeometryInfo::max_children_per_face;
-template const unsigned int GeometryInfo::vertices_per_cell;
+#ifdef DEAL_II_USE_CXX11
+ // Workaround for some versions of gcc-4.8.1 (notably on Cygwin and Mac)
+ // that incorrectly fail to deduce the second version as a constexpr
+ template constexpr unsigned int GeometryInfo::vertices_per_cell;
+#else
+ template const unsigned int GeometryInfo::vertices_per_cell;
+#endif
template const unsigned int GeometryInfo::vertices_per_face;
template const unsigned int GeometryInfo::lines_per_face;
template const unsigned int GeometryInfo::quads_per_face;
--
2.39.5