Hi Lori,<br><br>If you have options it's better to use imported libraries. They are far more flexible and allow specifying more than just debug and optimized configurations.<br><br>If you stuck with these keywords, you can look at QT4_EXTRACT_OPTIONS macro in Qt4Macros.cmake (in CMake distribution). It contains only one option, but you can use similar approach to extend for any number of named parameters.<br>
<br><div class="gmail_quote">On Thu, Mar 3, 2011 at 1:38 AM, Lori Pritchett-Sheats <span dir="ltr"><<a href="mailto:lpritch@lanl.gov">lpritch@lanl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
After reading the documentation, target_link_libraries allows a user to pass a list with keywords debug, optimized and general to indicate which set of libraries to use when CMAKE_BUILD_TYPE is set. Is there a command, function or macro that parses lists that have these keywords and returns the appropriate set of libraries. Something like<br>
set(lib_list "debug;a;b;c;optimized;e;f;general;g;h")<br>
parse_library_list( lib_list DEBUG debug_libs OPT opt_libs GENERAL gen_libs)<br>
and it would return<br>
debug_libs=a;b;c<br>
opt_libs=e;f<br>
gen_libs=g;h<br>
<br>
I've tried using CMakeParseArguments to parse lib_list but haven't had any success. Though I would ask before attempting to write my own parser.<br>
<br>
-- <br>
Lori A. Pritchett-Sheats, PhD.<br>
CCS-2, Computational Physics and Methods<br>
Office: 505-665-6675<br>
Fax: 505-665-4972<br>
<br>
Los Alamos National Laboratory<br>
P.O. Box 1663<br>
MS D413<br>
Los Alamos, NM 87544<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br>