Hey all,
I'm working on putting together some platform files for CMake for Blue Gene/Q,
and I'd really like to be able to make *one* platform file for both static and
dynamic executables, so that I can install both from the same build.
BG/Q (like BG/P) requires that you add -dynamic (gcc) or -qnostaticlink (XL)
when you link a dynamic executable. You don't add that flag when you link
static executables. Unfortunately, there is only one variable that determines
the link rule for an executable:
CMAKE_<lang>_LINK_EXECUTABLE
When I wrote the platform files for BG/P (see
Modules/Platform/BlueGeneP-base.cmake), we decided that there really need to be
two platform files for BG -- one for static and one for dynamic executables.
That is why there is a profusion of BG/P platform files in the Modules/Platform
directory, but I find this cumbersome -- it would be nice to have a build that
can install both static and dynamic executables.
What would it take to give CMake some way to mark an executable as static or
dynamic? How is this done on other platforms? Do people typically just set
extra linker flags on an exe when they want it to be static? Or is there a
target property that controls this?
-Todd
______________________________________________________________________
Todd Gamblin, [email protected], http://people.llnl.gov/gamblin2
CASC @ Lawrence Livermore National Laboratory, Livermore, CA, USA
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers