yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #08661
[IMPORANT] Migration to cmake
Dear users and developers,
if you looked after my last commits, you have probably payed attention
on changes in cmake-build. Cmake is a cross-platform, open-source system
widely used today for many open-source projects to handle build-process.
I am going to replace scons build-system, which is used in yade last
several years. The reason is to escape complicated and "hacked"
style of SConstruct-files in the project, which is hard to maintain.
CMake should prolong the life of yade without any changes from the "build-side".
Also we will hopefully get better portability of the program on
different platforms.
I want to ask everybody to test precisely the new build-system before we
drop scons-files.
Cmake is working differently, other than scons. It builds its files
not in the same
folder, where is the source. So, you have to create a separate "build-place"
for you. Like in scons, you should point the place, where the files will be
installed.
1. Create a build place (a folder)
2. go into that folder
3. run in command line:
cmake -DINSTALL_PREFIX=/path/to/installfolder /path/to/sources
4. Read, what is the written at the end of configure-process. You will
see there,
which yade-modules are enabled and disabled.
If you want to enable/disable some modules, you should add to cmake command
line the following variables:
-DENABLE_GUI=ON (or OFF)
-DENABLE_VTK=ON (or OFF)
-DENABLE_OPENMP=ON (or OFF)
-DENABLE_GTS=ON (or OFF)
-DENABLE_GL2PS=ON (or OFF)
All modules are ON by default. But if you do not have necessary
packages in your
system, some of them will be disabled by CMAKE. You will get a
notice about that.
Other parameters:
-DDEBUG=ON (OFF by default) create debug-build
-DSUFFIX=MYVERSION (by default - git revision) create suffix
-DNOSUFFIX=ON (OFF by default) do not create suffix for yade
(like yade-git-1234565)
-DCMAKE_VERBOSE_MAKEFILE=ON (OFF by default) show an additional
info during build
5. Type in command line
make
And wait, when the process is finished. Alternatively you can
indicate how much cores,
you want to use. For example:
make -j4
Please, pay attention, yade requires approximately 2GB RAM/core.
6. Install:
make install
For GUI-option on Debian/Ubuntu-systems, please install 2 additional packages:
sudo apt-get install libxmu-dev libxi-dev
I have disabled chunkSize option for the moment. Yade has always
problems with a huge consumption
of RAM (especially on build-servers) during the compilation.
I would like to ask everybody to test it and give a feedback.
Cheers.
Anton
Follow ups