Re: [CMake] Add libraries to end of compilation line ...

2014-06-27 Thread Michael Burns via CMake
Hello. That is a good idea, Hendrik. I'll look into that. Angeliki, we set the CMAKE_CXX_FLAGS... and CMAKE_C_FLAGS... values with various options. I simply added the -static and -static-libstdc++ to those. Again, I'm trying to do this without having to

Re: [CMake] Add libraries to end of compilation line ...

2014-06-27 Thread Kornel Benko
Am Donnerstag, 26. Juni 2014 um 20:12:12, schrieb Hendrik Sattler p...@hendrik-sattler.de Hi, you can also override the target_link_libraries function with your own in the top-level lists file and call the original one from within that function. This way you only have to edit one file.

Re: [CMake] Add libraries to end of compilation line ...

2014-06-27 Thread Hendrik Sattler
Hi, IIRC the old function is preserved as the same name with an underscore as prefix... Regards, HS On 27. Juni 2014 10:23:07 MESZ, Kornel Benko kor...@lyx.org wrote: Am Donnerstag, 26. Juni 2014 um 20:12:12, schrieb Hendrik Sattler p...@hendrik-sattler.de Hi, you can also override the

Re: [CMake] Add libraries to end of compilation line ...

2014-06-26 Thread Angeliki Chrysochou
Hi Michael, I think what matters is the correctly set dependencies for your build to succeed (target_link_libraries). By statically link you mean you link against static libraries that were before shared objects, right? This should, to my knowledge, not have any influence to how you use

Re: [CMake] Add libraries to end of compilation line ...

2014-06-26 Thread Michael Burns via CMake
Hello, Angeliki. Yes, you are correct. I want to link against the static libraries (.a) rather than the shared objects (.so). I know it shouldn't make a difference, but it is. Adding the -static option to the gcc command line causes the link failures to happen. Without that option, everything

Re: [CMake] Add libraries to end of compilation line ...

2014-06-26 Thread Hendrik Sattler
Hi, you can also override the target_link_libraries function with your own in the top-level lists file and call the original one from within that function. This way you only have to edit one file. HS On 26. Juni 2014 18:14:36 MESZ, Michael Burns via CMake cmake@cmake.org wrote: Hello,

Re: [CMake] Add libraries to end of compilation line ...

2014-06-26 Thread Angeliki Chrysochou
Hi, This is a good idea Hendrik! Mike, how are you creating your static libraries? You don't need to at the -static option yourself...you could tell cmake you want a static library using add_library(${YOUR_LIB} STATIC ${SOURCES}). Cheers, Angeliki On Jun 26, 2014 8:12 PM, Hendrik Sattler

[CMake] Add libraries to end of compilation line ...

2014-06-25 Thread Michael Burns via CMake
Hello, all. I work on a cross-platform project that has many libraries and several applications. CMake on Linux naturally adds the TARGET_LINK_LIBRARIES specified in the libraries after those specified in the TARGET_LINK_LIBRARIES for the application. However, there are several common system