Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
d
e
f
g
i
j
l
m
n
o
p
q
r
s
t
u
v
w
+
Functions
_
a
b
c
d
f
g
i
j
l
m
o
p
q
r
s
t
u
v
+
Variables
_
a
b
c
d
e
f
g
i
j
l
m
n
p
r
s
u
v
w
+
Typedefs
c
e
f
i
m
q
r
s
v
Enumerations
Enumerator
+
Classes
Class List
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
~
+
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Typedefs
b
d
e
f
k
l
m
s
t
v
Enumerations
+
Enumerator
a
b
c
d
e
f
g
i
j
k
m
n
o
p
r
s
t
u
Related Functions
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
u
v
+
Functions
b
c
d
e
f
g
i
l
m
o
p
r
s
t
u
Variables
+
Typedefs
c
d
e
f
k
r
s
t
Enumerations
Enumerator
+
Macros
_
a
b
c
d
e
f
i
l
m
n
o
p
r
s
t
v
cmake
compile.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
# Copyright (C) 2008-2014 LAAS-CNRS, JRL AIST-CNRS.
4
#
5
# This file is part of jrl-cmakemodules.
6
# jrl-cmakemodules is free software: you can redistribute it and/or
7
# modify it under the terms of the GNU Lesser General Public License
8
# as published by the Free Software Foundation, either version 3 of
9
# the License, or (at your option) any later version.
10
#
11
# jrl-cmakemodules is distributed in the hope that it will be useful, but
12
# WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
# General Lesser Public License for more details. You should have
15
# received a copy of the GNU Lesser General Public License along with
16
# jrl-cmakemodules. If not, see <http://www.gnu.org/licenses/>.
17
18
import
sys
19
import
py_compile
20
21
srcdir = sys.argv[1]
22
builddir = sys.argv[2]
23
name = sys.argv[3]
24
25
if
srcdir[-1] !=
"/"
:
26
srcdir = srcdir +
"/"
27
if
builddir[-1] !=
"/"
:
28
builddir = builddir +
"/"
29
30
src = srcdir + name
31
comp = builddir + name + (__debug__
and
"c"
or
"o"
)
32
33
# print("compiling " + src + " into " + comp)
34
35
# os.mkdir(os.path.splittext(comp)[0])
36
37
try
:
38
py_compile.compile(src, comp, doraise=
True
)
39
except
Exception
as
e:
40
print(
"Failed to compile python script: {0}"
.format(repr(src)))
41
print(
"Exception raised: {0}"
.format(str(e)))
42
sys.exit(1)
sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Wed Jun 21 2023 02:51:26