[CMake] my first experiences

Xen list at xenhideout.nl
Fri Jun 9 03:40:43 EDT 2017


I just want to tell you what terrible software CMake is.

The newest version won't compile on my system. The bootstrapping just 
won't complete.

It hangs on 100% CPU while trying to link cmake. Maybe that is a deficit 
of this system.

I take an older version but it needs ncurses. I have ncurses on the 
system but not the headers.

The ncurses source package likes to install headers in a ncurses 
subdirectory. Fine.

But Cmake can't find it.

I specify --prefix=/opt/local.

The headers are in /opt/local/include/ncurses.

At first I find a reference to CURSES_INCLUDE_PATH but setting it as an 
environment variable doesn't do a thing.

There is no help that I can find in the directory structure.

The bootstrap command does not have any help builtin.

I add CURSES_INCLUDE_PATH to Modules/FindCurse.cmake and it finds the 
header but now offset from /ncurses. This causes the header file itself 
to not find its other header files.

The only directory it needs for that is /opt/local/include.

I try to add CMAKE_INCLUDE_PATH on the command line.
I try to add CMAKE_C_FLAGS on the command line.

But the build system does not tell me what it's doing.

So I am just endlessly waiting several minutes before it errors out 
again and I still don't know why or what would have helped, because it 
does not show me any command lines or directories it has seen fit to 
use.

This goes on for hours.

This is the first time I have come into contact with Cmake and 
apparently you need to be able to use CMake as a programmer for your own 
projects, before you can get started with cmake.

Then again it errs out:

/store/dev/cmake/Source/CursesDialog/form/form.h:40:20: error: curses.h: 
No such file or directory

Oh, I added a colon as path separator and now it doesn't do anything 
anymore.

So my mistake was to add ncurses at the end of the path but it's not 
like it should have failed using CMAKE_INCLUDE_PATH or CMAKE_C_FLAGS.

Or even that it should not look in that location by default based on 
--prefix.

At first I couldn't compile ncurses; apparently a bug in the system. I 
supplied the fix in CFLAGS but the Makefile of course did not pass it on 
to the file for which it mattered, so I had to even repeat that 
manually.

Luckily GNU make shows you the command line.

It took me 3 hours to compile version 2.4.0. The latest release 
candidate had been working all night and not proceeding.

Then when I am finally done, it tells me it needs a newer version...

Of course, it doesn't say so in the README.rst...

I wish this endless waste of time would end.


More information about the CMake mailing list