-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanage-version-cmake.html
405 lines (350 loc) · 23.4 KB
/
manage-version-cmake.html
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Cmake를 이용한 version 관리</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="Wonseok Choi">
<!-- Le styles -->
<link rel="stylesheet" href="/theme/css/bootstrap.min.css" type="text/css" />
<style type="text/css">
body {
padding-top: 60px;
padding-bottom: 40px;
}
.sidebar-nav {
padding: 9px 0;
}
.tag-1 {
font-size: 13pt;
}
.tag-2 {
font-size: 10pt;
}
.tag-2 {
font-size: 8pt;
}
.tag-4 {
font-size: 6pt;
}
</style>
<link href="/theme/css/bootstrap-responsive.min.css" rel="stylesheet">
<link href="/theme/css/font-awesome.css" rel="stylesheet">
<link href="/theme/css/pygments.css" rel="stylesheet">
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Le fav and touch icons -->
<link rel="shortcut icon" href="/theme/images/favicon.ico">
<link rel="apple-touch-icon" href="/theme/images/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="/theme/images/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="/theme/images/apple-touch-icon-114x114.png">
<link href="/" type="application/atom+xml" rel="alternate" title="Svperbeast Blog ATOM Feed" />
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="/index.html">Svperbeast Blog </a>
<div class="nav-collapse">
<ul class="nav">
<li class="divider-vertical"></li>
<li class="active">
<a href="/category/blog.html">
<i class="icon-folder-open icon-large"></i>Blog
</a>
</li>
<li >
<a href="/category/sicp.html">
<i class="icon-folder-open icon-large"></i>SICP
</a>
</li>
<ul class="nav pull-right">
<li><a href="/archives.html"><i class="icon-th-list"></i>Archives</a></li>
</ul>
</ul>
<!--<p class="navbar-text pull-right">Logged in as <a href="#">username</a></p>-->
</div><!--/.nav-collapse -->
</div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="span9" id="content">
<section id="content">
<article>
<header>
<h1>
<a href=""
rel="bookmark"
title="Permalink to Cmake를 이용한 version 관리">
Cmake를 이용한 version 관리
</a>
</h1>
</header>
<div class="entry-content">
<div class="well">
<footer class="post-info">
<span class="label">Date</span>
<abbr class="published" title="2013-09-14T18:01:00+09:00">
<i class="icon-calendar"></i>토 14 9월 2013
</abbr>
<span class="label">By</span>
<a href="/author/wonseok-choi.html"><i class="icon-user"></i>Wonseok Choi</a>
<span class="label">Category</span>
<a href="/category/blog.html"><i class="icon-folder-open"></i>Blog</a>.
<span class="label">Tags</span>
<a href="/tag/cmake.html"><i class="icon-tag"></i>cmake</a>
<a href="/tag/library_version.html"><i class="icon-tag"></i>library_version</a>
</footer><!-- /.post-info --> </div>
<p><a href="http://www.cmake.org">cmake</a>는 요즘 오픈소스 프로젝트에서 많이 사용되는
build system이다. autotools를 이용해서 배포하는 경우에는 UNIX에 기본적으로
설치되어있는 도구들을 이용하기 때문에 autotools 자체가 필요하지 않다는 장점이
있지만, 사용하기가 어려워 사람들이 꺼려하는 것 같다. 뿐만아니라 다양한 platform
에서 사용할 수 없다.</p>
<p>python으로 작성된 Scons, waf 등 도 있는데, 사용해보지 않아서 할 말은 없지만
cross platform 지원 및 유연함 확장성 등 이 좋을 것 같다. 다만 python이 설치된
시스템에서만 사용할 수 있다. 큰 프로젝트에서는 속도도 문제가 된다고 한다.</p>
<p>cmake는 Scons와는 다르게 실행파일 (executable)을 만들어내지 않고 makefile (Linux
등), solution file (Windows)를 만들어준다. 그렇기 때문에 IDE 또는 다른 build
system과 독립적으로 사용될 수 있다. Qt library를 이용하는 경우에 qmake 대신에
cmake를 이용할 수 있어서 프로젝트에 포함시키기가 쉽다.
google test (gtest)를 이용할 때도 프로젝트에 포함시킨 후 <code>add_subdirectory</code>
명령만 사용하면 된다 (gtest에 CMakeLists.txt 파일이 있기 때문에 가능하다).[1]</p>
<p>cmake는 상당히 많은 platform을 지원하는데, real time OS 중에 하나인 QNX에서도
사용할 수 있다. 지금 일하는 회사에서 개인적으로 vim과 terminal에서 작업하는
것을 선호해서 cmake를 사용해왔는데, 최근에 기본 build system으로 선정해서
사용하기로 했다. cross compile이 가능하도록 option을 만들 수도 있고, 기본적으로
terminal에서 command로 build 및 test를 실행할 수 있어야 일일빌드 등 도 할 수
있다.</p>
<p>프로그램을 만들 때 (특히 library) versioning 하는 것은 상당히 중요하다.
cmake를 이용한다면 오늘 소개하는 방식으로 version 관리를 할 수 있을 것이다.
여러가지 방법이 있겠지만 다음과 같이 version number를 정한다:</p>
<ul>
<li>major: 호환성을 보장하지 않는 큰 변화.</li>
<li>minor: 호환성을 (거의) 보장하는 변화 (기능 추가, 개선 등).</li>
<li>patch: 호환성을 완벽히 보장 (bug fix, 긴급한 수정 등).</li>
</ul>
<p>build 시 자동으로 위에 정의한 version number를 적용시키기 위해 다음과 같이
CMakeLists.txt 파일을 작성한다.</p>
<div class="highlight"><pre><span></span><span class="nb">set</span> <span class="p">(</span><span class="s">MYPROJECT_VERSION_MAJOR</span> <span class="s">0</span><span class="p">)</span>
<span class="nb">set</span> <span class="p">(</span><span class="s">MYPROJECT_VERSION_MINOR</span> <span class="s">1</span><span class="p">)</span>
<span class="nb">set</span> <span class="p">(</span><span class="s">MYPROJECT_VERSION_PATCH</span> <span class="s">0</span><span class="p">)</span>
<span class="nb">set</span> <span class="p">(</span><span class="s">MYPROJECT_VERSION_STRING</span> <span class="s2">"0.1.0"</span><span class="p">)</span>
<span class="nb">set</span> <span class="p">(</span><span class="s">MYPROJECT_FEATURES</span>
<span class="s2">"feature_a"</span><span class="s">,</span>
<span class="s2">"feature_b"</span>
<span class="p">)</span>
<span class="nb">configure_file</span> <span class="p">(</span>
<span class="s2">"${version_SOURCE_DIR}/version.h.in"</span>
<span class="s2">"${CMAKE_BINARY_DIR}/include/version.h"</span>
<span class="p">)</span>
</pre></div>
<p><code>myproject</code>라는 프로젝트를 하고 있다면 root directory에 version이라는 폴더를
만든다 (어떻게 하든 상관없지만..). 위의 내용은 version 폴더에 위치한
CMakeLists.txt에 포함된다. 만약 위의 내용대로라면 <code>version.h.in</code> 파일로 부터
<code>${CMAKE_BINARY_DIR}/include/version.h</code> 를 만들기 때문에, 상위 폴더에 있는
CMakeLists.txt에는 다음 명령이 포함되어 있어야 한다.</p>
<div class="highlight"><pre><span></span><span class="nb">include_directories</span> <span class="p">(</span>
<span class="s2">"${CMAKE_BINARY_DIR}/include"</span>
<span class="p">)</span>
</pre></div>
<p><code>CMAKE_BINARY_DIR</code> 은 cmake를 실행한 경로를 의미한다.</p>
<p><code>version.h.in</code> 의 내용은 다음과 같다:</p>
<div class="highlight"><pre><span></span><span class="cp">#ifndef MYPROJECT_VERSION_H_</span>
<span class="cp">#define MYPROJECT_VERSION_H_</span>
<span class="cp">#include</span> <span class="cpf"><string></span><span class="cp"></span>
<span class="cp">#define MYPROJECT_VERSION_MAJOR @MYPROJECT_VERSION_MAJOR@</span>
<span class="cp">#define MYPROJECT_VERSION_MINOR @MYPROJECT_VERSION_MINOR@</span>
<span class="cp">#define MYPROJECT_VERSION_PATCH @MYPROJECT_VERSION_PATCH@</span>
<span class="cp">#define MYPROJECT_VERSION_STRING "@MYPROJECT_VERSION_STRING@</span>
<span class="cp">#define MYPROJECT_FEATURES "@MYPROJECT_FEATURES@;" </span><span class="c1">// do not delete last ;</span>
<span class="k">class</span> <span class="nc">myproject_version</span>
<span class="p">{</span>
<span class="k">static</span> <span class="kt">int</span> <span class="n">major</span><span class="p">();</span>
<span class="k">static</span> <span class="kt">int</span> <span class="nf">minor</span><span class="p">();</span>
<span class="k">static</span> <span class="kt">int</span> <span class="nf">patch</span><span class="p">();</span>
<span class="k">static</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">version</span><span class="p">();</span>
<span class="k">static</span> <span class="kt">bool</span> <span class="nf">atLeast</span><span class="p">(</span><span class="kt">int</span> <span class="n">major</span><span class="p">,</span> <span class="kt">int</span> <span class="n">minor</span><span class="p">,</span> <span class="kt">int</span> <span class="n">patch</span><span class="p">);</span>
<span class="k">static</span> <span class="kt">bool</span> <span class="nf">hasFeature</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="o">&</span><span class="n">name</span><span class="p">);</span>
<span class="p">};</span>
<span class="cp">#endif </span><span class="c1">// !MYPROJECT_VERSION_H_</span>
</pre></div>
<p><code>@</code>로 감싼 cmake variable이 치환되어 <code>version.h</code> 파일이 된다.</p>
<p><code>myproject_version</code> class의 기능을 구현하기 위해 cpp 파일에 다음의 내용이
포함되면 된다.</p>
<div class="highlight"><pre><span></span><span class="cp">#ifndef MYPROJECT_VERSION_H_</span>
<span class="cp">#include</span> <span class="cpf">"version.h"</span><span class="cp"></span>
<span class="cp">#include</span> <span class="cpf"><cstring></span><span class="cp"></span>
<span class="kt">int</span> <span class="n">myproject_version</span><span class="o">::</span><span class="n">major</span><span class="p">()</span>
<span class="p">{</span>
<span class="k">return</span> <span class="n">MYPROJECT_VERSION_MAJOR</span><span class="p">;</span>
<span class="p">}</span>
<span class="kt">int</span> <span class="n">myproject_version</span><span class="o">::</span><span class="n">minor</span><span class="p">()</span>
<span class="p">{</span>
<span class="k">return</span> <span class="n">MYPROJECT_VERSION_MINOR</span><span class="p">;</span>
<span class="p">}</span>
<span class="kt">int</span> <span class="n">myproject_version</span><span class="o">::</span><span class="n">patch</span><span class="p">()</span>
<span class="p">{</span>
<span class="k">return</span> <span class="n">MYPROJECT_VERSION_PATCH</span><span class="p">;</span>
<span class="p">}</span>
<span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">myproject_version</span><span class="o">::</span><span class="n">version</span><span class="p">()</span>
<span class="p">{</span>
<span class="k">return</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="p">(</span><span class="n">MYPROJECT_VERSION_STRING</span><span class="p">);</span>
<span class="p">}</span>
<span class="kt">bool</span> <span class="n">myproject_version</span><span class="o">::</span><span class="n">atLeast</span><span class="p">(</span><span class="kt">int</span> <span class="n">major</span><span class="p">,</span> <span class="kt">int</span> <span class="n">minor</span><span class="p">,</span> <span class="kt">int</span> <span class="n">patch</span><span class="p">)</span>
<span class="p">{</span>
<span class="k">if</span> <span class="p">(</span><span class="n">major</span> <span class="o"><</span> <span class="n">MYPROJECT_VERSION_MAJOR</span><span class="p">)</span> <span class="p">{</span>
<span class="k">return</span> <span class="nb">false</span><span class="p">;</span>
<span class="p">}</span>
<span class="k">if</span> <span class="p">(</span><span class="n">minor</span> <span class="o"><</span> <span class="n">MYPROJECT_VERSION_MINOR</span><span class="p">)</span> <span class="p">{</span>
<span class="k">return</span> <span class="nb">false</span><span class="p">;</span>
<span class="p">}</span>
<span class="k">if</span> <span class="p">(</span><span class="n">patch</span> <span class="o"><</span> <span class="n">MYPROJECT_VERSION_PATCH</span><span class="p">)</span> <span class="p">{</span>
<span class="k">return</span> <span class="nb">false</span><span class="p">;</span>
<span class="p">}</span>
<span class="k">return</span> <span class="nb">true</span><span class="p">;</span>
<span class="p">}</span>
<span class="kt">bool</span> <span class="n">myproject_version</span><span class="o">::</span><span class="n">hasFeature</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&</span> <span class="n">name</span><span class="p">)</span>
<span class="p">{</span>
<span class="k">const</span> <span class="kt">char</span><span class="o">*</span> <span class="n">pch</span><span class="p">;</span>
<span class="k">const</span> <span class="kt">char</span><span class="o">*</span> <span class="n">start</span><span class="p">;</span>
<span class="k">const</span> <span class="kt">char</span><span class="o">*</span> <span class="n">features</span> <span class="o">=</span> <span class="n">MYPROJECT_FEATURES</span><span class="p">;</span>
<span class="n">start</span> <span class="o">=</span> <span class="n">features</span><span class="p">;</span>
<span class="n">pch</span> <span class="o">=</span> <span class="n">strchr</span><span class="p">(</span><span class="n">features</span><span class="p">,</span> <span class="sc">';'</span><span class="p">);</span>
<span class="k">while</span> <span class="p">(</span><span class="n">pch</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span>
<span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">feature</span><span class="p">(</span><span class="n">start</span><span class="p">,</span> <span class="n">pch</span> <span class="o">-</span> <span class="n">start</span><span class="p">);</span>
<span class="k">if</span> <span class="p">(</span><span class="n">feature</span> <span class="o">==</span> <span class="n">name</span><span class="p">)</span> <span class="p">{</span>
<span class="k">return</span> <span class="nb">true</span><span class="p">;</span>
<span class="p">}</span>
<span class="n">start</span> <span class="o">=</span> <span class="n">pch</span> <span class="o">+</span> <span class="mi">1</span><span class="p">;</span>
<span class="n">pch</span> <span class="o">=</span> <span class="n">strchr</span><span class="p">(</span><span class="n">start</span><span class="p">,</span> <span class="sc">';'</span><span class="p">);</span>
<span class="p">}</span>
<span class="k">return</span> <span class="nb">false</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
<p>version number 정하는 것과 version 정보를 제공하는 class 등 에 대한 내용은
API design for C++ [2] 에서 다루고 있으니 참고하기 바란다.</p>
<p>그러면 version 정보를 활용하는 방법에 대해서 알아보자.</p>
<p>Compile time에 확인하는 방법은 다음과 같다:</p>
<div class="highlight"><pre><span></span><span class="cp">#ifndef MYPROJECT_VERSION_H_</span>
<span class="cp">#include</span> <span class="cpf">"version.h"</span><span class="cp"></span>
<span class="p">...</span>
<span class="cp">#if ((MYPROJECT_VERSION_MAJOR < 1) ||\</span>
<span class="cp"> (MYPROJECT_VERSION_MINOR < 0) ||\</span>
<span class="cp"> (MYPROJECT_VERSION_PATCH < 1))</span>
<span class="cp">#error "version >= v1.0.1 required."</span>
<span class="cp">#endif</span>
</pre></div>
<p>Runtime에서 확인하는 방법은 다음과 같다:</p>
<div class="highlight"><pre><span></span><span class="cp">#ifndef MYPROJECT_VERSION_H_</span>
<span class="cp">#include</span> <span class="cpf">"version.h"</span><span class="cp"></span>
<span class="c1">// get version numbers</span>
<span class="kt">int</span> <span class="n">major</span> <span class="o">=</span> <span class="n">myproject_version</span><span class="o">::</span><span class="n">major</span><span class="p">();</span>
<span class="kt">int</span> <span class="n">minor</span> <span class="o">=</span> <span class="n">myproject_version</span><span class="o">::</span><span class="n">minor</span><span class="p">();</span>
<span class="kt">int</span> <span class="n">patch</span> <span class="o">=</span> <span class="n">myproject_version</span><span class="o">::</span><span class="n">patch</span><span class="p">();</span>
<span class="c1">// get version string</span>
<span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o"><<</span> <span class="s">"myproject version: "</span> <span class="o"><<</span> <span class="n">myproject_version</span><span class="o">::</span><span class="n">version</span><span class="p">()</span> <span class="o"><<</span> <span class="s">"</span><span class="se">\n</span><span class="s">"</span><span class="p">;</span>
<span class="c1">// at least v1.0.0</span>
<span class="k">if</span> <span class="p">(</span><span class="n">myproject_versioin</span><span class="o">::</span><span class="n">atLeast</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">))</span> <span class="p">{</span>
<span class="p">...</span>
<span class="p">}</span>
<span class="c1">// has feature XXX?</span>
<span class="k">if</span> <span class="p">(</span><span class="n">myproject_version</span><span class="o">::</span><span class="n">hasFeature</span><span class="p">(</span><span class="s">"XXX"</span><span class="p">))</span> <span class="p">{</span>
<span class="c1">// use XXX</span>
<span class="p">}</span>
</pre></div>
<p>version 정보 관리를 굳이 cmake를 이용해서 할 필요는 없다.
그렇다 하더라도 <code>myproject_version</code> class가 도움이 될 수 있을 것이다.
cmake를 프로젝트의 기본 build system으로 쓰고 있다면 참고해보길 바란다.</p>
<p>[1] 참고로, google test를 사용할 때 프로젝트에 포함시켜서 같이 컴파일할 것을
추천하고 있다. <a href="http://code.google.com/p/googletest/wiki/V1_6_FAQ#Why_is_it_not_recommended_to_install_a_pre-compiled_copy_of_Goog">google test FAQ</a></p>
<p>[2] <a href="http://www.apibook.com/blog">API design for C++</a></p>
</div><!-- /.entry-content -->
<div class="comments">
<h2>Comments !</h2>
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_identifier = "manage-version-cmake.html";
(function() {
var dsq = document.createElement('script');
dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'https://svperbeast-blog.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] ||
document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
</div>
</article>
</section>
</div><!--/span-->
<div class="span3 well sidebar-nav" id="sidebar">
<ul class="nav nav-list">
<li class="nav-header"><h4><i class="icon-home icon-large"></i> social</h4></li>
<li><a href="http://github.com/svperbeast"><i class="icon-github-sign icon-large"></i>github</a></li>
<li class="nav-header"><h4><i class="icon-folder-close icon-large"></i>Categories</h4></li>
<li>
<a href="/category/blog.html">
<i class="icon-folder-open icon-large"></i>Blog
</a>
</li>
<li>
<a href="/category/sicp.html">
<i class="icon-folder-open icon-large"></i>SICP
</a>
</li>
<li class="nav-header"><h4><i class="icon-tags icon-large"></i>Tags</h4></li>
<li class="tag-4">
<a href="/tag/library_version.html">
<i class="icon-tag icon-large"></i>library_version
</a>
</li>
<li class="tag-1">
<a href="/tag/sicp.html">
<i class="icon-tag icon-large"></i>sicp
</a>
</li>
<li class="tag-4">
<a href="/tag/struct.html">
<i class="icon-tag icon-large"></i>struct
</a>
</li>
<li class="tag-4">
<a href="/tag/cmake.html">
<i class="icon-tag icon-large"></i>cmake
</a>
</li>
</ul> </div><!--/.well -->
</div><!--/row-->
<hr>
<footer>
<address id="about">
Proudly powered by <a href="http://pelican.notmyidea.org/">Pelican <i class="icon-external-link"></i></a>,
which takes great advantage of <a href="http://python.org">Python <i class="icon-external-link"></i></a>.
</address><!-- /#about -->
<p>The theme is from <a href="http://twitter.github.com/bootstrap/">Bootstrap from Twitter <i class="icon-external-link"></i></a>,
and <a href="http://fortawesome.github.com/Font-Awesome/">Font-Awesome <i class="icon-external-link"></i></a>, thanks!</p>
</footer>
</div><!--/.fluid-container-->
<script type="text/javascript">
var disqus_shortname = 'svperbeast-blog';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
<!-- Le javascript -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="/theme/js/jquery-1.7.2.min.js"></script>
<script src="/theme/js/bootstrap.min.js"></script>
</body>
</html>