[CMake] cmake doesnt use /usr/bin/ar with c++ projects
Brad King
brad.king at kitware.com
Fri Jul 21 12:06:07 EDT 2006
Filipe Sousa wrote:
> Philipp Meinen wrote:
>> 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
>
> http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/1758/focus=1758
I've put this fix in CVS CMake and it will be included in 2.4.3. There
is also now a test for C++-only projects.
Thanks,
-Brad
More information about the CMake
mailing list