[CMake] Custom launcher command for VS2010
Sybren A. Stüvel
sybren at stuvel.eu
Thu Aug 1 06:09:53 EDT 2013
Hi list,
I'm using Visual Studio 2010 to create Python modules in C++. In order to
"run" those modules, I need to execute something like:
C:\Python33\python.exe some_script_that_uses_the_module.py
To generate the VS2010 solution we use CMake. What I'm looking for is to
configure the above command in the Debug settings. I tried using the
CreateLaunchers script from https://github.com/rpavlik/cmake-modules, but
unfortunately that doesn't allow me to override the executable command.
For example, our unit tests are compiled into an executable, but still need
to be run via a Python script to set up the environment correctly.
Unfortunately the following in my CMake project definition:
set_target_properties(${PROJECTNAME}
PROPERTIES
LOCATION "${PYTHON_EXECUTABLE}"
LOCATION_DEBUG "${PYTHON_EXECUTABLE}"
LOCATION_RELEASE "${PYTHON_EXECUTABLE}"
LOCATION_RELWITHDEBINFO "${PYTHON_EXECUTABLE}"
)
create_default_target_launcher(${PROJECTNAME}
ARGS "run_boost_tests.py"
WORKING_DIRECTORY "${RAGE_SCRIPTS_DIR}"
)
still creates the following line in launch-boost_test-Debug.cmd:
"C:\workspace\rage\build\tests\boost_test\DEBUG\boost_test.exe"
run_boost_tests.py
but I would like to see:
"C:\Python33\python.exe" run_boost_tests.py
Apparently the LOCATION target properties (which are used by the
CreateLaunchers module) are read-only. Is there any way to solve this?
Best,
--
Sybren A. Stüvel
http://stuvel.eu/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130801/8b79b095/attachment.htm>
More information about the CMake
mailing list