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/
--

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://www.cmake.org/mailman/listinfo/cmake

Reply via email to