<div dir="ltr">Hi list,<div><br></div><div>I'm using Visual Studio 2010 to create Python modules in C++. In order to "run" those modules, I need to execute something like:</div><div><br></div><div>C:\Python33\python.exe some_script_that_uses_the_module.py</div>
<div><br></div><div>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 <a href="https://github.com/rpavlik/cmake-modules">https://github.com/rpavlik/cmake-modules</a>, but unfortunately that doesn't allow me to override the executable command.</div>
<div><br></div><div>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:</div>
<div><br></div><div><div><br></div><div>set_target_properties(${PROJECTNAME}</div><div> PROPERTIES</div><div> LOCATION "${PYTHON_EXECUTABLE}"</div><div> LOCATION_DEBUG "${PYTHON_EXECUTABLE}"</div>
<div> LOCATION_RELEASE "${PYTHON_EXECUTABLE}"</div><div> LOCATION_RELWITHDEBINFO "${PYTHON_EXECUTABLE}"</div><div>)</div><div><br></div><div>create_default_target_launcher(${PROJECTNAME}</div><div>
ARGS "run_boost_tests.py"</div><div> WORKING_DIRECTORY "${RAGE_SCRIPTS_DIR}"</div><div>)</div><div><br></div><div>still creates the following line in launch-boost_test-Debug.cmd:</div><div><br></div>
<div><div>"C:\workspace\rage\build\tests\boost_test\DEBUG\boost_test.exe" run_boost_tests.py </div></div><div><br></div><div>but I would like to see:</div><div><br></div><div>"C:\Python33\python.exe" run_boost_tests.py</div>
<div><br></div><div>Apparently the LOCATION target properties (which are used by the CreateLaunchers module) are read-only. Is there any way to solve this?</div><div><br></div><div>Best,</div>-- <br>Sybren A. Stüvel<br><br>
<a href="http://stuvel.eu/" target="_blank">http://stuvel.eu/</a><br><br>
</div></div>