[CMake] cmake doesnt use /usr/bin/ar with c++ projects

Philipp Meinen philipp at bind.ch
Tue Jul 11 16:33:51 EDT 2006


Hello

I recently used cmake for a project.
So I added a line like this to my CMakeLists.txt:
PROJECT(ProjectName CXX)

Later on, when i tested the build-environment
i saw error lines like this:
cd /some/directory &&  cr libFOO.a  "CMakeFiles/FOO.dir/Foo.o"

Now this is the line of the Makefile where
the archiver should generate an archive of the object files.
But there is no binary for the archiver specified, only
the arguments.
After playing around for some time I found out, that I need
to write the Project definition like this:
PROJECT(ProjectName C CXX)
or
PROJECT(ProjectName)

It seems that there is no archiver binary defined for
a "plain c++ project".
I added a small example project to show the problem.

I hope this report will improve cmake in a way that
other users dont have to spend hours to find this bug(?).

Regards,
Philipp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmake.tar
Type: application/x-tar
Size: 10240 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20060711/a10032a2/cmake.tar


More information about the CMake mailing list