I have created a file hermes_common/CMakeCommon.txt:
https://github.com/hpfem/hermes/blob/master/hermes_common/CMakeCommon.txt
that contains common cmake definitions for h1d, h2d and h3d. Currently
lots of functionality is simply duplicated in h1d, h2d and h3d. Please
start adding common rules into this file.
It has to be strictly dimension independent though. I enabled
inclusion of this file in all h1d, h2d and h3d.
As a matter of fact, h3d didn't even compile with recent changes in
hermes_common, so I have fixed that and pushed it in too. Normally we
should always use pull requests, but if it fails to compile, that is
an emergency and has to be fixed asap.
Unrelated thing: I am deeply annoyed by pages of gcc error messages.
So by applying this patch, you can force gcc to only print the first
error and then exit:
diff --git a/hermes_common/CMakeCommon.txt b/hermes_common/CMakeCommon.txt
index a365627..1e65333 100644
--- a/hermes_common/CMakeCommon.txt
+++ b/hermes_common/CMakeCommon.txt
@@ -5,7 +5,7 @@
set(CMAKE_CXX_FLAGS "-g ${CMAKE_CXX_FLAGS}")
IF (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# Stop on first error
-# set(CMAKE_CXX_FLAGS "-Wfatal-errors ${CMAKE_CXX_FLAGS}")
+ set(CMAKE_CXX_FLAGS "-Wfatal-errors ${CMAKE_CXX_FLAGS}")
ENDIF()
Originally I thought that I would propose this to be enabled by
default, but unfortunately, gcc is really stupid in this and if it is
enabled, the first error message is not as verbose as it could be, in
particular, it doesn't print a list of candidates, when some function
signature is wrong. This is a bug in gcc. :( So as a result, I'll
leave this disabled for now, but feel free to play with it.
Ondrej
Pavel
--
Pavel Solin
University of Nevada, Reno
Home page: http://hpfem.org/~pavel
FEMTEC 2011: http://hpfem.org/events/femtec-2011/
Hermes: http://hpfem.org/
FEMhub: http://femhub.org/