On 2013-11-02 13:38, Cyrille Faucheux wrote:
[...] from what I understood from Matthew first answer ("implicit compile
flags [...] for imported tagets"), I was under the impression that I could
get MYPROJECT_STATIC automatically defined when linking another program
against a static version of my
Wow, this thread has gone wild...
To clarify my case:
The prototype of each functions I want to export is prefixed by a
MYPROJECT_EXTERNAL preprocessor constant. With Visual Studio, this constant
is, by default, set to __declspec(dllimport). This way, I can link against
the shared version of this
Microsoft believed in hidden by default for shared libraries.
Don't say things like this: people will never hide anything ever
again... ;-)
But seriously, making only those things public that are explicitly
exported has some major benefits: for one, it minimizes the probability
of clashes w
On 31 October 2013 20:21, Hendrik Sattler wrote:
>
> Giordano Khouri schrieb:
>>I am a firm believer that static libraries should have hidden
>>visibility. This is based on my experience on the Mac and may be
>>different in Linux.
>
> This is about Windows, not Linux or Mac. Linking libraries wor
-
>>> From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On
>>> Behalf Of J Decker
>>> Sent: Thursday, October 31, 2013 3:27 PM
>>> To: Hendrik Sattler
>>> Cc: Matthew Woehlke; cmake@cmake.org
>>> Subject: Re: [CMake] Proper w
ed into an executable.
>
>> -Original Message-
>> From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On
>> Behalf Of J Decker
>> Sent: Thursday, October 31, 2013 3:27 PM
>> To: Hendrik Sattler
>> Cc: Matthew Woehlke; cmake@cmake.org
>> Sub
sday, October 31, 2013 3:27 PM
> To: Hendrik Sattler
> Cc: Matthew Woehlke; cmake@cmake.org
> Subject: Re: [CMake] Proper way to export a library
>
> something like (but probably mostly in a common header)
>
> if( IS_THIS_PROJECT )
> if( UNIX or STATIC )
> set
On 2013-10-31 14:46, Hendrik Sattler wrote:
Matthew Woehlke schrieb:
On 2013-10-31 05:26, Cyrille Faucheux wrote:
On the library I'm currently working on, with Visual Studio, I have
to declare some compile definition in order to get the proper
"__declspec(dllimport)" or "__declspec(dllexport)"
something like (but probably mostly in a common header)
if( IS_THIS_PROJECT )
if( UNIX or STATIC )
set( EXPORT ) # nothing, everything is exported by default; gcc/unix
else( UNIX or STATIC )
set( EXPORT __declspec(dllexport) )
endif( UNIX or STATIC )
else( IS_THIS_PROJECT )
Matthew Woehlke schrieb:
>On 2013-10-31 05:26, Cyrille Faucheux wrote:
>> Can you tell me a bit more about "implicit compile flags [...] for
>imported
>> tagets"?
>
>See documentation on target_compile_definitions.
>
>> On the library I'm currently working on, with Visual Studio, I have
>to
>> d
Cyrille Faucheux wrote:
> Ok, great.
>
> Can you tell me a bit more about "implicit compile flags [...] for
> imported tagets"?
>
> On the library I'm currently working on, with Visual Studio, I have to
> declare some compile definition in order to get the proper
> "__declspec(dllimport)" or "__
On 2013-10-31 05:26, Cyrille Faucheux wrote:
Can you tell me a bit more about "implicit compile flags [...] for imported
tagets"?
See documentation on target_compile_definitions.
On the library I'm currently working on, with Visual Studio, I have to
declare some compile definition in order to
Ok, great.
Can you tell me a bit more about "implicit compile flags [...] for imported
tagets"?
On the library I'm currently working on, with Visual Studio, I have to
declare some compile definition in order to get the proper
"__declspec(dllimport)" or "__declspec(dllexport)" defined (or not defi
On 2013-10-30 13:56, Cyrille Faucheux wrote:
I'm trying to learn how to properly import/export librairies with CMake.
I think I've read somewhere that the proper way to export libraries is
through the module mode (as described in [1]), but:
a) I can't find back where I've read that,
b) Lots of l
Hi,
I'm trying to learn how to properly import/export librairies with CMake.
I think I've read somewhere that the proper way to export libraries is
through the module mode (as described in [1]), but:
a) I can't find back where I've read that,
b) Lots of libraries are still using the module mode (
15 matches
Mail list logo