-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathconfigure
More file actions
executable file
·31 lines (26 loc) · 1.67 KB
/
configure
File metadata and controls
executable file
·31 lines (26 loc) · 1.67 KB
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
#!/usr/bin/env python
from optparse import OptionParser
from os import system
parser = OptionParser()
parser.add_option("", "--prefix", type="string", dest="prefix", default=".",
help="The path where the software should get installed to. "
"By default it installs into the build directory.", metavar="PATH")
parser.add_option("", "--build-type", type="string", dest="build_type", default="Release", metavar="STRING",
help="The cmake build type. Possible values are: \"None\", \"Debug\", \"Release\". "
"Default is \"Release\".")
parser.add_option("", "--c-compiler", type="string", dest="c_compiler", default="gcc", metavar="STRING",
help="The C compiler to use. The value of this option is used to call ``which <C-COMPILER>`` "
"to determine the location of the C compiler. Try \"gcc\" or \"clang\". "
"Default is \"gcc\".")
parser.add_option("", "--cxx-compiler", type="string", dest="cxx_compiler", default="g++", metavar="STRING",
help="The C++ compiler to use. The value of this option is used to call ``which <CXX-COMPILER>`` "
"to determine the location of the C++ compiler. Try \"g++\" or \"clang++\". "
"Default is \"g++\".")
(options, args) = parser.parse_args()
print("Configuring boost_numpy ...")
print(" prefix=%s"%(options.prefix))
print(" c-compiler=%s"%(options.c_compiler))
print(" cxx-compiler=%s"%(options.cxx_compiler))
system("rm -rf build")
system("mkdir -p build")
system("cd build && /usr/bin/env cmake -DCMAKE_BUILD_TYPE=\"%s\" -DCMAKE_INSTALL_PREFIX=\"%s\" -DCMAKE_CXX_COMPILER=`which %s` -DCMAKE_C_COMPILER=`which %s` .."%(options.build_type, options.prefix, options.cxx_compiler, options.c_compiler))