[CMake] CMAKE_C++_CREATE_SHARED_LIBRARY missing
Dvir Yitzchaki
Dvir.Yitzchaki at ceva-dsp.com
Mon Jul 11 03:17:47 EDT 2016
You were close.
I searched for 'C++' in all our CMakeLists.txt and found the line
set_target_properties(foo PROPERTIES LINKER_LANGUAGE C++)
changed that to CXX and now the error is gone.
Thanks,
Dvir
-----Original Message-----
From: Andreas Mohr [mailto:andi at lisas.de]
Sent: Sunday, July 10, 2016 7:12 PM
To: cmake at cmake.org
Cc: Dvir Yitzchaki
Subject: Re: [CMake] CMAKE_C++_CREATE_SHARED_LIBRARY missing
Hi,
On Sun, Jul 10, 2016 at 12:00:02PM -0400, cmake-request at cmake.org wrote:
> Message: 1
> Date: Sun, 10 Jul 2016 05:04:35 +0000
> From: Dvir Yitzchaki <Dvir.Yitzchaki at ceva-dsp.com>
> To: "'cmake at cmake.org'" <cmake at cmake.org>
> Subject: [CMake] CMAKE_C++_CREATE_SHARED_LIBRARY missing
> Message-ID:
> <71350F7ED6EBB54AA2D182B26086A1B60114AC591B at ILMAIL1.corp.local>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi.
>
> I use cmake 3.3.1 on Red-Hat 5 and 6.
> When I generate a project I get the following error:
>
> CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
> Missing variable is:
> CMAKE_C++_CREATE_SHARED_LIBRARY
>
> However, after the error the generation succeeds and I can build the project successfully.
> The same project is generated without errors on Windows 7 with Visual Studio generators and other projects are also generated without errors on the same Linux machine.
>
> Does anyone knows the source of that error?
Rimshot idea:
Quite possibly someone did a
project(foo C C++)
rather than using the (IIRC - no docs here ATM) correct CXX.
HTH,
Andreas Mohr
More information about the CMake
mailing list