[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cybop-developers] CMake

From: Enrico Gallus
Subject: Re: [cybop-developers] CMake
Date: Tue, 7 Mar 2017 15:03:04 +0900

Hi Christian,

first of all it’s really fun to participate on cybop after such a long time.
There is a small gap of time i can use at the moment to support the project a little bit, so i’m eager to help to improve with the project as good as i can.

Hi Enrico,

So i will dig into CMake, CTest and CPack a little bit. I gathered already some questions.

very good.

I use CMake at the moment on my local computer and i have to say, that the compiling time improved a lot.
There is just one file I will commit. It contains all the information about what to build and what to pack.
All files which will be created by CMake are outside of the src-directory create in a temp folder. So it will not pollute the src-directory at all.

Fine. Sounds good and my first test looks promising.

Just some wishes:
- it should work without errors before removing auto tools scripts
It works for me on the mac after installing cmake, i will commit the files, could you check if it works for you as well? A feedback is highly appreciated!

In principle, CMake works on my box.

I had to fix the CMake version in file "CMakeLists.txt" from 3.8.0 to
3.0.2, in order to be usable under current Debian stable.
I just used the newest version, haven’t checked which one is available for other operation systems. Sorry about that, but luckily easy one to fix. 

I then received two compile errors which I could fix in CYBOI.
See the following email "CMake Errors”.
Interesting that the compile errors didn’t occur using the makefiles and additional that they did not happen on my machine.

Then, there is still a linker error to be fixed (missing XCB lib).
See the following email "CMake Errors”.
Please try this again. I updated the CMakeList.txt file.
It now links several libraries which are used and are defined in the I did not take care of this before, my compiler did not complain at all.

One additional hint for you:

When packaging CYBOP for distribution with CPack, you may want to also
consider the files in directory: admin/ There are e.g. three man pages:
I haven’t found a way to include the manpages in the cpack process yet. But i think some people have been able to already by using some custom commands.
BTW the manpages are not up to date and still contain berlios pages. I will create an issue for updating the manages.

and a CYBOP icon in various sizes, that might get mentioned in CMake
normally icons are provided using .ico file extension.
There is a command for .ico and there is also the opportunity to define a windows icon using a png.
or CPack and get included in distributable packages.
I already included the whole admin directory in the package.

In directory "admin/", there is also the VERY old Makefile from 2006.
Do you want to keep the VERY old Makefile? The exclude_include txt files confused me a lot too.
Btw, do you still release three different components (CYBOL, CYBOP, CYBOI)? The process looks like, but the download-section of the homepage has only cybop.
And the content of the tar on the homepage does not match the definition in the makefile somehow. at least, i found some slightly differences.

I really need some definitions over here, what you expect!

If you have a better idea where i.e. into which directory to put these
files (manpages, icons), then please tell me! So we could delete "admin/“.
I created a subfolder CMake to have a place where i could put the FindCBX.cmake. Maybe we can put this manages and icon’s there as well?

- it should be easier, at least not more complicated than autotools
I’m absolutely not familiar with the autotools to be honest, but the cmake configuration is in my opinion quite easy to understand.

You might have to complete the CMake configuration files with some
directories and files. Please see the following autotools files:
- src/
- src/controller/

If I remember correctly, then some students of mine have used CMake
while working with the "Code::Blocks" IDE. If you like, try it out:
And tell us what you think about it.
The Code::Blocks can be easily created by exciting the following command: cmake .. -G"CodeBlocks - Unix Makefiles
other code block config files can be created using a different literal
but this will just generate a wrapper around the cmake commands. the student project probably needs to be adjusted, all the time the files for building the binary are changed, because there are all the c-files are referenced as units.

- put generated distributable packages or installers into "dist/“
this was quite a bit complicate. the platform dependent package is automatically deployed to dist now (.sh + tar.gz) just using cpack-command (zip, deb-package and other opportunities are possible easily)

If other projects handle this differently or use another directory than
"dist/", so please tell me. Perhaps we can change this to be up-to-date.
The cpack by default generates the release-zip’s to the root directory. Only a strange hack makes it possible to generate it somewhere else. But the release zips are not committed anyway. You are copying it afterwards to the www of the web server, right?

- ask me back once more on any unclearities
- at the moment the release package only contains the cyboi-binary. i guess there belong more to the release.
- copyright information and a lot of other configurations are possible (
- all directories or files which should be added needs to be set in the configuration using the INSTALL command
- please let me know how you would like to have the release and i will try to adjust the configuration that it will suit your process

See the autotools files ( and listed above.
For version CYBOI 0.19.0 to come, our aim should be to make CMake work
so that we have the same result as with the auto tools.
The definition for the cybop component produce a tar.gz with exactly the same content as the 0.18.0 zip released on the homepage.
As mentioned above, this can be easily adjusted and needs just some definitions.

More changes can be done in future releases.

the following steps on the console needs to be done in the root-directory:

1. cmake . # create makefiles
2. make # create cyboi binary
3. cpack # created release package

I followed these three commands, but due to the linker error was
hanging in step 2. Awaiting your changes for a new test on my side.
As said, please give it a second try. It’s hard to fix an issue that does not occur on my system. But my changes looked promising :)

If you are satisfied with CMake we can get ride of the makefiles/autotool-scripts later on.

It looks promising. Let's see. It seems to be more slim than autotools.

If all works fine one day, we can delete the following:

Best regards,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]