Re: [CMake] CMAKE_EXE_LINKER_FLAGS for shared libraries?

2011-12-16 Thread Michael Hertling
On 12/13/2011 11:19 PM, Michael Hertling wrote: On 12/13/2011 09:21 PM, David Cole wrote: On Tue, Dec 13, 2011 at 2:09 PM, Robert Dailey rcdai...@gmail.com wrote: Thanks for the info. It's a bit disappointing that it doesn't work like I expect. The CMAKE_MFC_FLAG should work as you say the

Re: [CMake] CMAKE_EXE_LINKER_FLAGS for shared libraries?

2011-12-13 Thread Robert Dailey
Thanks for the info. It's a bit disappointing that it doesn't work like I expect. The CMAKE_MFC_FLAG should work as you say the link flags should, but it does not. As long as CMAKE_MFC_FLAG is set before I create my target, it works. Since CMAKE_SHARED_LINK_FLAGS does not work the same, I consider

Re: [CMake] CMAKE_EXE_LINKER_FLAGS for shared libraries?

2011-12-13 Thread David Cole
On Tue, Dec 13, 2011 at 2:09 PM, Robert Dailey rcdai...@gmail.com wrote: Thanks for the info. It's a bit disappointing that it doesn't work like I expect. The CMAKE_MFC_FLAG should work as you say the link flags should, but it does not. As long as CMAKE_MFC_FLAG is set before I create my

Re: [CMake] CMAKE_EXE_LINKER_FLAGS for shared libraries?

2011-12-13 Thread Michael Hertling
On 12/13/2011 09:21 PM, David Cole wrote: On Tue, Dec 13, 2011 at 2:09 PM, Robert Dailey rcdai...@gmail.com wrote: Thanks for the info. It's a bit disappointing that it doesn't work like I expect. The CMAKE_MFC_FLAG should work as you say the link flags should, but it does not. As long as

[CMake] CMAKE_EXE_LINKER_FLAGS for shared libraries?

2011-12-12 Thread Robert Dailey
I need a version of CMAKE_EXE_LINKER_FLAGS for shared libraries. I need to specify /NODEFAULTLIB for a shared library (DLL) that I'm building, but it doesn't seem that CMAKE_EXE_LINKER_FLAGS is used by shared library projects generated by CMake for visual studio. Any suggestions? -

Re: [CMake] CMAKE_EXE_LINKER_FLAGS for shared libraries?

2011-12-12 Thread Michael Wild
On 12/12/2011 09:00 PM, Robert Dailey wrote: I need a version of CMAKE_EXE_LINKER_FLAGS for shared libraries. I need to specify /NODEFAULTLIB for a shared library (DLL) that I'm building, but it doesn't seem that CMAKE_EXE_LINKER_FLAGS is used by shared library projects generated by CMake for

Re: [CMake] CMAKE_EXE_LINKER_FLAGS for shared libraries?

2011-12-12 Thread David Cole
Apparently, they are undocumented, but there are also: CMAKE_SHARED_LINKER_FLAGS and CMAKE_MODULE_LINKER_FLAGS (and their per-config variants) for SHARED and MODULE library targets as well. Use CMAKE_SHARED_LINKER_FLAGS instead. HTH, David On Mon, Dec 12, 2011 at 3:00 PM, Robert Dailey

Re: [CMake] CMAKE_EXE_LINKER_FLAGS for shared libraries?

2011-12-12 Thread Robert Dailey
On Mon, Dec 12, 2011 at 2:10 PM, David Cole david.c...@kitware.com wrote: Apparently, they are undocumented, but there are also: CMAKE_SHARED_LINKER_FLAGS and CMAKE_MODULE_LINKER_FLAGS (and their per-config variants) for SHARED and MODULE library targets as well. Use

Re: [CMake] CMAKE_EXE_LINKER_FLAGS for shared libraries?

2011-12-12 Thread Robert Dailey
On Mon, Dec 12, 2011 at 2:13 PM, Robert Dailey rcdai...@gmail.com wrote: On Mon, Dec 12, 2011 at 2:10 PM, David Cole david.c...@kitware.comwrote: Apparently, they are undocumented, but there are also: CMAKE_SHARED_LINKER_FLAGS and CMAKE_MODULE_LINKER_FLAGS (and their per-config variants)

Re: [CMake] CMAKE_EXE_LINKER_FLAGS for shared libraries?

2011-12-12 Thread David Cole
On Mon, Dec 12, 2011 at 3:15 PM, Robert Dailey rcdai...@gmail.com wrote: On Mon, Dec 12, 2011 at 2:13 PM, Robert Dailey rcdai...@gmail.com wrote: On Mon, Dec 12, 2011 at 2:10 PM, David Cole david.c...@kitware.com wrote: Apparently, they are undocumented, but there are also:

Re: [CMake] CMAKE_EXE_LINKER_FLAGS for shared libraries?

2011-12-12 Thread Michael Wild
On 12/12/2011 09:13 PM, Robert Dailey wrote: On Mon, Dec 12, 2011 at 2:10 PM, David Cole david.c...@kitware.com mailto:david.c...@kitware.com wrote: Apparently, they are undocumented, but there are also: CMAKE_SHARED_LINKER_FLAGS and CMAKE_MODULE_LINKER_FLAGS (and their

Re: [CMake] CMAKE_EXE_LINKER_FLAGS for shared libraries?

2011-12-12 Thread Robert Dailey
Another issue... At what point is it most important for the values of CMAKE_SHARED_LINK_FLAGS to exist? I set the value of this variable before my call to add_library(), however after that at some point the flags will get reverted because I'm stepping out of function scope. Does it need to exist

Re: [CMake] CMAKE_EXE_LINKER_FLAGS for shared libraries?

2011-12-12 Thread Robert Dailey
I forgot to say that the main issue is that my /NODEFAULTLIB link flag isn't showing up in visual studio. - Robert Dailey On Mon, Dec 12, 2011 at 4:10 PM, Robert Dailey rcdai...@gmail.com wrote: Another issue... At what point is it most important for the values of

Re: [CMake] CMAKE_EXE_LINKER_FLAGS for shared libraries?

2011-12-12 Thread Michael Wild
It needs to exist **at the end** of the CMakeLists.txt file containing the target. If you don't want to do that (or can't, as in your case), you can use the LINK_FLAGS target property instead. HTH Michael On 12/12/2011 11:39 PM, Robert Dailey wrote: I have attached a small CMake project that