Hi all,
I'm having problems linking shared libraries on Ubuntu 12.10 beta1
here (shipping with CMake 2.8.9), and found that this is related to
TARGET_SUPPORTS_SHARED_LIBS not being set. This
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
GET_PROPERTY(test GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS)
MESSA
Hi Nico.
I don't know, but I would assume this (just like a plethora of other
internals) is set up by a project() call. The rule of thumb is to call
project() a soon as you can.
Petr
On Tue, Sep 11, 2012 at 11:26 AM, Nico Schlömer wrote:
> Hi all,
>
> I'm having problems linking shared librarie
Indeed, that gets set up by the PROJECT() call.
Now, this creates a little bit of a problem here.
The main CMakeLists.txt looks something like
=== *snip* ===
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0)
FIND_PACKAGE(Foobar REQUIRED)
# Set compilers before the PROJECT is declare
2012/9/11 Nico Schlömer :
> Indeed, that gets set up by the PROJECT() call.
>
> Now, this creates a little bit of a problem here.
> The main CMakeLists.txt looks something like
>
> === *snip* ===
> CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0)
>
> FIND_PACKAGE(Foobar REQUIRED)
>
> #
Nico Schlömer wrote:
> Indeed, that gets set up by the PROJECT() call.
>
> Now, this creates a little bit of a problem here.
> The main CMakeLists.txt looks something like
>
> === *snip* ==> CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0)
>
> FIND_PACKAGE(Foobar REQUIRED)
>
> # Set co
> Compiler is not supposed to be set y a call to find_package.
Hm, I understand. Strictly speaking, FIND_PACKAGE(Foobar) doesn't
override CMAKE_C_FLAGS or anything like that, but rather provides a
number of extra variables that the user can then exploit.
The idea of using the same compiler is to a
On 9/11/2012 1:48 PM, Nico Schlömer wrote:
IF(${CMAKE_C_COMPILER} NOT STREQUAL ${Foobar_C_COMPILER})
?
message(FATAL_ERROR "your compilers are incompatible. Re-run cmake on
this project and set the environment variables CC and CXX to ... so that
they match the ones used by package foobar")