[CMake] porting to cmake 2.6 from 2.4.6
Bill Hoffman
bill.hoffman at kitware.com
Thu Jun 19 09:44:53 EDT 2008
Pau Garcia i Quiles wrote:
> Quoting David Blado <dblado at decarta.com>:
>
>> Hi all,
>>
>> I recently took up the task of porting to 2.6 (again…fell off my
>> plate for a while ☺ )
>>
>> I’m seeing this when running cmake:
>> CMake Error: Cannot determine link language for target "libraryX".
>>
>> All of the source files listed are cpp files:
>> SET(SRCS
>> fileA
>> )
>>
>> fileA is really fileA.cpp but I’ve noticed that I can ignore the .cpp
>> extension and CMake will find it.
>>
>> I’m building an so:
>> SET(BUILD_SHARED_LIBS ON)
>>
>> And using: ADD_LIBRARY(${LIB_NAME} ${SRCS})
>>
>> Any idea why CMake 2.6 is all of a sudden requesting that I use:
>> SET_TARGET_PROPERTIES(XYZ PROPERTIES LINKER_LANGUAGE CXX) when it
>> never did w/ CMake 2.4.x?
>
> Try SET_SOURCE_FILE_PROPERTIES( fileA PROPERTIES LANGUAGE CXX ). It's
> backwards-compatible with 2.4.x, BTW.
>
This was a bug that will be fixed in 2.6.1. Although files without
extensions are quite an "old" thing to do in CMake.
-Bill
--
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoffman at kitware.com
http://www.kitware.com
518-371-3971 (phone and fax)
More information about the CMake
mailing list