ENH: Tweak CMake cache variables "advancedness"
[freefoam.git] / ThirdParty / mgridgen.patch
blobf9711f18de3d6c3bfee1244d7c96c3a424120e38
1 diff --git a/CMakeLists.txt b/CMakeLists.txt
2 new file mode 100644
3 index 0000000..eaf4414
4 --- /dev/null
5 +++ b/CMakeLists.txt
6 @@ -0,0 +1,58 @@
7 +#-------------------------------------------------------------------------------
8 +# ______ _ ____ __ __
9 +# | ____| _| |_ / __ \ /\ | \/ |
10 +# | |__ _ __ ___ ___ / \| | | | / \ | \ / |
11 +# | __| '__/ _ \/ _ ( (| |) ) | | |/ /\ \ | |\/| |
12 +# | | | | | __/ __/\_ _/| |__| / ____ \| | | |
13 +# |_| |_| \___|\___| |_| \____/_/ \_\_| |_|
15 +# FreeFOAM: The Cross-Platform CFD Toolkit
17 +# Copyright (C) 2008-2010 Michael Wild <themiwi@users.sf.net>
18 +# Gerber van der Graaf <gerber_graaf@users.sf.net>
19 +#-------------------------------------------------------------------------------
20 +# License
21 +# This file is part of FreeFOAM.
23 +# FreeFOAM is free software; you can redistribute it and/or modify it
24 +# under the terms of the GNU General Public License as published by the
25 +# Free Software Foundation; either version 2 of the License, or (at your
26 +# option) any later version.
28 +# FreeFOAM is distributed in the hope that it will be useful, but WITHOUT
29 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
30 +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
31 +# for more details.
33 +# You should have received a copy of the GNU General Public License
34 +# along with FreeFOAM; if not, write to the Free Software Foundation,
35 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
37 +#-------------------------------------------------------------------------------
39 +cmake_minimum_required(VERSION 2.8)
40 +project(MGridGen)
42 +find_package(Threads REQUIRED)
44 +include(files.cmake)
46 +include_directories(
47 + ${CMAKE_SOURCE_DIR}/MGridGen/IMlib
48 + ${CMAKE_SOURCE_DIR}/MGridGen/Lib
49 + )
50 +add_library(foam_mgridgen ${SRCS})
52 +target_link_libraries(foam_mgridgen ${CMAKE_THREAD_LIBS_INIT})
54 +install(TARGETS foam_mgridgen
55 + LIBRARY DESTINATION lib
56 + ARCHIVE DESTINATION lib
57 + RUNTIME DESTINATION bin
58 + )
60 +install(FILES mgridgen.h
61 + DESTINATION include
62 + )
64 +# ------------------------- vim: set sw=2 sts=2 et: --------------- end-of-file
65 diff --git a/MGridGen/IMlib/IMlib.h b/MGridGen/IMlib/IMlib.h
66 index 9d0c85c..94a90b8 100644
67 --- a/MGridGen/IMlib/IMlib.h
68 +++ b/MGridGen/IMlib/IMlib.h
69 @@ -40,12 +40,6 @@ typedef double realtype;
70 #include <stdarg.h>
71 #include <time.h>
73 -#ifdef DMALLOC
74 -#include <dmalloc.h>
75 -#else
76 -#include <malloc.h>
77 -#endif
79 /*************************************************************************
80 * Data structure definition section
81 **************************************************************************/
82 diff --git a/MGridGen/Lib/mgridgen.h b/MGridGen/Lib/mgridgen.h
83 index 0c146e1..c6506a0 100644
84 --- a/MGridGen/Lib/mgridgen.h
85 +++ b/MGridGen/Lib/mgridgen.h
86 @@ -23,12 +23,6 @@
88 #include "IMlib.h"
90 -#ifdef DMALLOC
91 -#include <dmalloc.h>
92 -#else
93 -#include <malloc.h>
94 -#endif
96 #include "defs.h"
97 #include "struct.h"
98 #include "macros.h"
99 diff --git a/ParMGridGen/IMParMetis-2.0/ParMETISLib/parmetis.h b/ParMGridGen/IMParMetis-2.0/ParMETISLib/parmetis.h
100 index 62d4903..eb7c33b 100644
101 --- a/ParMGridGen/IMParMetis-2.0/ParMETISLib/parmetis.h
102 +++ b/ParMGridGen/IMParMetis-2.0/ParMETISLib/parmetis.h
103 @@ -18,12 +18,6 @@
104 #include <time.h>
105 #include <mpi.h>
107 -#ifdef DMALLOC
108 -#include <dmalloc.h>
109 -#else
110 -#include <malloc.h>
111 -#endif
113 #include "rename.h"
114 #include "defs.h"
115 #include "struct.h"
116 diff --git a/ParMGridGen/ParLib/parmgridgen.h b/ParMGridGen/ParLib/parmgridgen.h
117 index 58882db..348c2d1 100644
118 --- a/ParMGridGen/ParLib/parmgridgen.h
119 +++ b/ParMGridGen/ParLib/parmgridgen.h
120 @@ -18,12 +18,6 @@
121 #include <time.h>
122 #include <mpi.h>
124 -#ifdef DMALLOC
125 -#include <dmalloc.h>
126 -#else
127 -#include <malloc.h>
128 -#endif
130 #include "IMlib.h"
132 #include "rename.h"
133 diff --git a/files.cmake b/files.cmake
134 new file mode 100644
135 index 0000000..da30fdf
136 --- /dev/null
137 +++ b/files.cmake
138 @@ -0,0 +1,53 @@
139 +#-------------------------------------------------------------------------------
140 +# ______ _ ____ __ __
141 +# | ____| _| |_ / __ \ /\ | \/ |
142 +# | |__ _ __ ___ ___ / \| | | | / \ | \ / |
143 +# | __| '__/ _ \/ _ ( (| |) ) | | |/ /\ \ | |\/| |
144 +# | | | | | __/ __/\_ _/| |__| / ____ \| | | |
145 +# |_| |_| \___|\___| |_| \____/_/ \_\_| |_|
147 +# FreeFOAM: The Cross-Platform CFD Toolkit
149 +# Copyright (C) 2008-2010 Michael Wild <themiwi@users.sf.net>
150 +# Gerber van der Graaf <gerber_graaf@users.sf.net>
151 +#-------------------------------------------------------------------------------
152 +# License
153 +# This file is part of FreeFOAM.
155 +# FreeFOAM is free software; you can redistribute it and/or modify it
156 +# under the terms of the GNU General Public License as published by the
157 +# Free Software Foundation; either version 2 of the License, or (at your
158 +# option) any later version.
160 +# FreeFOAM is distributed in the hope that it will be useful, but WITHOUT
161 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
162 +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
163 +# for more details.
165 +# You should have received a copy of the GNU General Public License
166 +# along with FreeFOAM; if not, write to the Free Software Foundation,
167 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
168 +#-------------------------------------------------------------------------------
170 +set(SRCS
171 + MGridGen/IMlib/blas.c
172 + MGridGen/IMlib/dfkeysort.c
173 + MGridGen/IMlib/file.c
174 + MGridGen/IMlib/ifkeysort.c
175 + MGridGen/IMlib/ifloatsort.c
176 + MGridGen/IMlib/iintsort.c
177 + MGridGen/IMlib/ikeysort.c
178 + MGridGen/IMlib/memory.c
179 + MGridGen/IMlib/sort.c
180 + MGridGen/IMlib/util.c
181 + MGridGen/Lib/aratio.c
182 + MGridGen/Lib/coarsen.c
183 + MGridGen/Lib/kwayfm.c
184 + MGridGen/Lib/match.c
185 + MGridGen/Lib/merge.c
186 + MGridGen/Lib/mgridgen.c
187 + MGridGen/Lib/refine.c
188 + MGridGen/Lib/setup.c
191 +# ------------------------- vim: set sw=2 sts=2 et: --------------- end-of-file