Ahsan Roy Ahsan Roy - 3 months ago 30
C++ Question

CMake Error: CMake can not determine linker language for target: myapp

I am trying to compile vMime by cmake, but I am getting error above,
I am using graphical interface of cmake and my makefiles.txt is below. It configures properly but do not generate

cmake_minimum_required(VERSION 2.8)
PROJECT(CXX)#vmime
enable_language(CXX)
set(VerifyCXX VerifyCXX.cxx)
add_definitions(-DVERIFY_CXX)
set_target_properties(${TARGET} PROPERTIES LINKER_LANGUAGE Cxx)
add_executable(myapp vmime)
install(TARGETS myapp DESTINATION bin)


Help will be highly appreciated as I am stuck at point for couple of days.

Answer
cmake_minimum_required(VERSION 2.8)
project(vmime)
add_executable(vmime VerifyCXX.cxx)

You may need to add definitions and install, but that should be sufficient to get you started, assuming you have a file called VerifyCXX.cxx -- under Linux filenames are case sensitive.

Comments