<< building qt-creator from source | Home | qt-creator: make stdout work in application-output-view >>

CMake Error: CMake can not determine linker language for target: [XYZ]

Just stumpled over a strange problem using CMake. A usually straight forward setup adding a 2nd executable lead to an error like this:

-- Configuring done
CMake Error: CMake can not determine linker language for target: Tests
-- Generating done

This might be related to me now using cmake 3.14 as minimum in the CMakeLists.txt-file or might be related to using CPM as CMake-internal package-manager (which requires 3.14). Not quite sure.

To make the long story short. I fixed it by adding following to the specific target:

    set_target_properties(Tests PROPERTIES LINKER_LANGUAGE CXX)

Reference: https://stackoverflow.com/questions/56462415/cmake-error-cannot-determine-link-language-for-target

Tags :

Export this post as PDF document  Export this post to PDF document

Social Bookmarks :  Add this post to Slashdot    Add this post to Digg    Add this post to Reddit    Add this post to Delicious    Add this post to Stumble it    Add this post to Google    Add this post to Technorati    Add this post to Bloglines    Add this post to Facebook    Add this post to Furl    Add this post to Windows Live    Add this post to Yahoo!
Home