Skip to content

Commit 0b1dd6f

Browse files
authored
Merge pull request #151 from thelfer/150-support-for-the-enable-glibcxx-debug-option-with-clang-and-intel-compilers
Fix Issue #150
2 parents 8e11695 + 6ef0693 commit 0b1dd6f

File tree

4 files changed

+48
-3
lines changed

4 files changed

+48
-3
lines changed

cmake/modules/clang.cmake

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,28 @@ if((NOT CMAKE_BUILD_TYPE) OR (CMAKE_BUILD_TYPE STREQUAL "Release"))
3636
set(OPTIMISATION_FLAGS "-O2 -DNDEBUG ${OPTIMISATION_FLAGS}")
3737
endif((NOT CMAKE_BUILD_TYPE) OR (CMAKE_BUILD_TYPE STREQUAL "Release"))
3838

39-
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
40-
add_definitions("-g")
41-
endif(CMAKE_BUILD_TYPE STREQUAL "Debug")
39+
option(enable-glibcxx-debug "use the debug version of the C++ standard as implemented by the glib C++ library" OFF)
40+
if(enable-glibcxx-debug)
41+
if(CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")
42+
set(CMAKE_CXX_FLAGS_DEBUG "-g -D_GLIBCXX_DEBUG -Rno-debug-disables-optimization" CACHE STRING
43+
"Flags used by the C++ compiler during debug builds."
44+
FORCE)
45+
else(CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")
46+
set(CMAKE_CXX_FLAGS_DEBUG "-g -D_GLIBCXX_DEBUG" CACHE STRING
47+
"Flags used by the C++ compiler during debug builds."
48+
FORCE)
49+
endif(CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")
50+
else(enable-glibcxx-debug)
51+
if(CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")
52+
set(CMAKE_CXX_FLAGS_DEBUG "-g -Rno-debug-disables-optimization" CACHE STRING
53+
"Flags used by the C++ compiler during debug builds."
54+
FORCE)
55+
else(CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")
56+
set(CMAKE_CXX_FLAGS_DEBUG "-g" CACHE STRING
57+
"Flags used by the C++ compiler during debug builds."
58+
FORCE)
59+
endif(CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")
60+
endif(enable-glibcxx-debug)
4261

4362
if(HAVE_FORTRAN)
4463
# we associate clang with the gnu fortran compiler

docs/web/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ if(MGIS_HAVE_PANDOC)
7070
mgis_pandoc_generate_html_page(release-notes-1.2 "--toc" "--toc-depth=3")
7171
mgis_pandoc_generate_html_page(release-notes-1.2.1 "--number-sections" "--toc" "--toc-depth=3")
7272
mgis_pandoc_generate_html_page(release-notes-1.2.2 "--number-sections" "--toc" "--toc-depth=3")
73+
mgis_pandoc_generate_html_page(release-notes-1.2.3 "--number-sections" "--toc" "--toc-depth=3")
7374
mgis_pandoc_generate_html_page(release-notes-2.0 "--toc" "--toc-depth=3")
7475
mgis_pandoc_generate_html_page(release-notes-2.1 "--toc" "--toc-depth=3")
7576
mgis_pandoc_generate_html_page(release-notes-2.2 "--toc" "--toc-depth=3")

docs/web/mgis-template.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
<li><a href="release-notes-1.2.html">Version 1.2</a></li>
9090
<li><a href="release-notes-1.2.1.html">Version 1.2.1</a></li>
9191
<li><a href="release-notes-1.2.2.html">Version 1.2.2</a></li>
92+
<li><a href="release-notes-1.2.3.html">Version 1.2.3</a></li>
9293
</ul>
9394
</li>
9495
<li><a>Version 2.0.x</a>

docs/web/release-notes-1.2.3.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: MFrontGenericInterfaceSupport Version 1.2.3
3+
author: Thomas Helfer, Jérémy Bleyer
4+
date: 2020
5+
lang: en-EN
6+
documentclass: article
7+
from: markdown+tex_math_single_backslash
8+
geometry:
9+
- margin=2cm
10+
papersize: a4
11+
link-citations: true
12+
colorlinks: true
13+
figPrefixTemplate: "$$i$$"
14+
tabPrefixTemplate: "$$i$$"
15+
secPrefixTemplate: "$$i$$"
16+
eqnPrefixTemplate: "($$i$$)"
17+
bibliography: bibliography.bib
18+
---
19+
20+
# Issues solved
21+
22+
## Issue #150: Support for the `enable-glibcxx-debug` option with `clang` and `intel` compilers
23+
24+
For more details, see <https://github.com/thelfer/MFrontGenericInterfaceSupport/issues/150>

0 commit comments

Comments
 (0)