summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-05-25 04:13:03 -0500
committerJohn Wiegley <johnw@newartisans.com>2012-05-25 04:13:14 -0500
commit98df1296feef737368aad881ab45838daeb34f22 (patch)
tree64b3bef6fd9a99fecbaaee946c4ad84cc6f77d86
parented150182fba35c605aafaf418aa18babf4901d48 (diff)
downloadfork-ledger-98df1296feef737368aad881ab45838daeb34f22.tar.gz
fork-ledger-98df1296feef737368aad881ab45838daeb34f22.tar.bz2
fork-ledger-98df1296feef737368aad881ab45838daeb34f22.zip
Build fixes to acprep and build.sh
-rwxr-xr-xacprep31
-rwxr-xr-xtools/build.sh15
2 files changed, 35 insertions, 11 deletions
diff --git a/acprep b/acprep
index beaf4d24..1118babe 100755
--- a/acprep
+++ b/acprep
@@ -296,6 +296,9 @@ class PrepareBuild(CommandLineApp):
op.add_option('', '--compiler', metavar='COMPILER',
action="store", dest="compiler",
help='Use the Clang C++ compiler')
+ op.add_option('', '--cxx', metavar='COMPILER',
+ action="store", dest="compiler",
+ help='Use the Clang C++ compiler')
op.add_option('', '--no-git', action='store_true', dest='no_git',
default=False,
@@ -654,8 +657,11 @@ class PrepareBuild(CommandLineApp):
#########################################################################
def setup_for_johnw(self):
- if not self.options.compiler or self.options.compiler == "clang-3.1":
- self.envvars['CXX'] = '/usr/local/stow/clang-3.1/bin/clang++'
+ self.configure_args.append('-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON')
+ self.configure_args.append('-DBoost_USE_MULTITHREADED:BOOL=OFF')
+
+ if not self.options.compiler:
+ self.configure_args.append('-DCMAKE_CXX_COMPILER:PATH=/usr/local/stow/clang-3.1/bin/clang++')
self.CXXFLAGS.append('-Qunused-arguments')
self.CXXFLAGS.append('-nostdlibinc')
@@ -667,17 +673,32 @@ class PrepareBuild(CommandLineApp):
self.CXXFLAGS.append('-Wl,/usr/local/lib/libc++.dylib')
self.CXXFLAGS.append('-Wno-disabled-macro-expansion')
+ if self.current_flavor == 'opt':
+ self.configure_args.append('-DCMAKE_CXX_FLAGS:STRING=-O4')
+ self.configure_args.append('-DCMAKE_CXX_LINK_FLAGS:STRING=-O4')
+
self.configure_args.append('-DCMAKE_INCLUDE_PATH:STRING=/usr/local/include;/opt/local/include')
self.configure_args.append('-DCMAKE_LIBRARY_PATH:STRING=/usr/local/lib;/opt/local/lib')
- self.configure_args.append('-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON')
+
self.configure_args.append('-DBOOST_ROOT=/usr/local')
self.configure_args.append('-DBOOST_INCLUDEDIR=/usr/local/include/boost-1_49')
self.configure_args.append('-DBoost_COMPILER=-clang-darwin')
+
self.configure_args.append(self.source_dir)
- elif self.options.compiler == "g=++-4.7":
- self.envvars['CXX'] = '/opt/local/bin/g++-mp-4.7'
+ elif self.options.compiler == "icc":
+ self.configure_args.append('-DCMAKE_AR:PATH=/opt/intel/bin/xiar')
+ self.configure_args.append('-DCMAKE_CXX_COMPILER:PATH=/opt/intel/bin/icc')
+ if self.current_flavor == 'opt':
+ self.configure_args.append('-DCMAKE_CXX_FLAGS:STRING=-fast')
+ self.configure_args.append('-DCMAKE_CXX_LINK_FLAGS:STRING=-fast')
+ self.configure_args.append('-DCMAKE_INCLUDE_PATH:STRING=/opt/local/include')
+ self.configure_args.append('-DCMAKE_LIBRARY_PATH:STRING=/opt/local/lib')
+ self.configure_args.append('-DBOOST_ROOT=/opt/local')
+ self.configure_args.append(self.source_dir)
+ else:
+ self.configure_args.append('-DCMAKE_CXX_COMPILER:PATH=' + self.options.compiler)
self.configure_args.append('-DCMAKE_INCLUDE_PATH:STRING=/opt/local/include')
self.configure_args.append('-DCMAKE_LIBRARY_PATH:STRING=/opt/local/lib')
self.configure_args.append('-DBOOST_ROOT=/opt/local')
diff --git a/tools/build.sh b/tools/build.sh
index f0522451..185fe791 100755
--- a/tools/build.sh
+++ b/tools/build.sh
@@ -1,9 +1,12 @@
#!/bin/sh
-time ( \
- cd ~/src/ledger ; \
- PATH=/usr/local/bin:/opt/local/bin:$PATH \
- nice -n 20 ./acprep --debug --python --doxygen make -j20 && \
- PATH=/usr/local/bin:/opt/local/bin:$PATH \
- nice -n 20 ./acprep --debug --python --doxygen check -j20 \
+flavor=$1
+shift 1
+
+time ( \
+ cd ~/src/ledger ; \
+ PATH=/usr/local/bin:/opt/local/bin:$PATH \
+ nice -n 20 ./acprep $flavor --debug --python --doxygen make "$@" && \
+ PATH=/usr/local/bin:/opt/local/bin:$PATH \
+ nice -n 20 ./acprep $flavor --debug --python --doxygen check "$@" \
) \ No newline at end of file