Error: CMake can not determine linker language for target

When linking libraries with Cmake, it may get confused on which language must be used. This leads to the following error:

CMake Error: CMake can not determine linker language for target:[some name]
CMake Error: Cannot determine link language for target "[some name]".

The solution is to explicitly tell it:

SET_TARGET_PROPERTIES([some name] PROPERTIES LINKER_LANGUAGE C)

About these ads

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s