English 中文(简体)
Change command used by bjam when installing C++ boost library
原标题:

I am trying to make the installation of boost library a little bit slower, because there too many calls to gcc in a short time, which increase my CPU temperature to its limit and crashes the system.

So I add this in /etc/site-config.jam

using gcc ; ; "sleep 10; g++" ;

However, it gives this error:

$ ./bjam install
/etc/site-config.jam:5: syntax error at keyword ;
/etc/site-config.jam:5: in load
rule sleep 10; g++ unknown in module pch.
/tmp/boost_1_40_0/tools/build/v2/kernel/modules.jam:283: in import
/tmp/boost_1_40_0/tools/build/v2/tools/gcc.jam:19: in load
/tmp/boost_1_40_0/tools/build/v2/kernel/modules.jam:283: in import
/tmp/boost_1_40_0/tools/build/v2/build/toolset.jam:37: in toolset.using
/tmp/boost_1_40_0/tools/build/v2/build/project.jam:874: in using
project-config.jam:12: in modules.load
/tmp/boost_1_40_0/tools/build/v2/build-system.jam:241: in load-config
/tmp/boost_1_40_0/tools/build/v2/build-system.jam:407: in load-configuration-files
/tmp/boost_1_40_0/tools/build/v2/build-system.jam:538: in load
/tmp/boost_1_40_0/tools/build/v2/kernel/modules.jam:283: in import
/tmp/boost_1_40_0/tools/build/v2/kernel/bootstrap.jam:138: in boost-build
/tmp/boost_1_40_0/boost-build.jam:16: in module scope

How can I solve this?

最佳回答

Let me just duplicate the answer I gave on the boost-users mailing list.

Please refer to gcc setup documentation

The syntax is gives is:

    using gcc : [version] : [c++-compile-command] : [compiler options] ;

In other words, you need to have ":" instead of the first and the second ";".

问题回答

暂无回答




相关问题
Boost cheat sheet [closed]

I just had a hell of a project doing simple operations on C++, then when I was almost completely done with the project I found out that all this stupid tasks required just a portion of boost. This was ...

Weighted random numbers

I m trying to implement a weighted random numbers. I m currently just banging my head against the wall and cannot figure this out. In my project (Hold em hand-ranges, subjective all-in equity ...

std::locale breakage on MacOS 10.6 with LANG=en_US.UTF-8

I have a C++ application that I am porting to MacOSX (specifically, 10.6). The app makes heavy use of the C++ standard library and boost. I recently observed some breakage in the app that I m having ...

boost::thread causing small event handle leak?

I m debugging this database project. It wraps access to SQLite for a higher level application. It s designed to run asynchronously, that is, it has methods like ExecuteRequestAsync() and ...

Change command used by bjam when installing C++ boost library

I am trying to make the installation of boost library a little bit slower, because there too many calls to gcc in a short time, which increase my CPU temperature to its limit and crashes the system. ...

Should I use a const reference or a boost::shared_ptr?

I have created some C++ classes to model a Solitaire game as a learning exercise. I have classes for the SolitaireGame, a CardStack (one of the 10 piles of cards on the board ) and a Card. My ...

热门标签