On 02/20/2012 03:42 PM, Eric Noulard wrote:
You may avoid to create a list in the first place: set(myoptions "one
two three") instead of set(myoptions one two three) see cmake
--help-command list or you can string(REPLACE ";" " " stringopts
"${myoptions}") message(STATUS "${stringopts}")
So now I ended up with this, where the final command is the list
concatenation of two other lists,
and then use the replace trick and create a custom_command which should
run it.
set(GEN_DEPENDENCY_SCRIPT $ENV{PSI_PATH}/devsonly/devsonly/bin/build_app.py)
set(INSTALLED_EGGS_LIST installed_eggs.txt)
set(BUILD_APP_OPTIONS -o ${INSTALLED_EGGS_LIST} -w ${WORKSPACE}
${APPLICATION})
list(APPEND GEN_DEPENDENCY_CMD ${PYTHON_EXECUTABLE}
${GEN_DEPENDENCY_SCRIPT} ${BUILD_APP_OPTIONS})
string(REPLACE ";" " " GEN_DEPENDENCY_CMD ${GEN_DEPENDENCY_CMD})
add_custom_command(
OUTPUT ${INSTALLED_EGGS_LIST}
COMMAND ${GEN_DEPENDENCY_CMD}
)
But it doesn't work yet, even if the list is actually correct the
command executed gives this:
/bin/sh:
/usr/bin/python~/git_projs/PSI_Hamburg/devsonly/devsonly/bin/build_app.py-oinstalled_eggs.txt-w/home/andrea/git_projs/home/andrea/git_projs/Minimum_Drag/airbus.application.minimum_drag:
No such file or directory
The thing which is not quite clear is what COMMAND takes as option,
probably not a list but a list
is converted automatically to the arguments that it takes?
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake