<div dir="ltr">Hi list,<div><br></div><div>I&#39;m using Visual Studio 2010 to create Python modules in C++. In order to &quot;run&quot; 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&#39;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&#39;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 &quot;${PYTHON_EXECUTABLE}&quot;</div><div>    LOCATION_DEBUG &quot;${PYTHON_EXECUTABLE}&quot;</div>
<div>    LOCATION_RELEASE &quot;${PYTHON_EXECUTABLE}&quot;</div><div>    LOCATION_RELWITHDEBINFO &quot;${PYTHON_EXECUTABLE}&quot;</div><div>)</div><div><br></div><div>create_default_target_launcher(${PROJECTNAME}</div><div>
    ARGS &quot;run_boost_tests.py&quot;</div><div>    WORKING_DIRECTORY &quot;${RAGE_SCRIPTS_DIR}&quot;</div><div>)</div><div><br></div><div>still creates the following line in launch-boost_test-Debug.cmd:</div><div><br></div>
<div><div>&quot;C:\workspace\rage\build\tests\boost_test\DEBUG\boost_test.exe&quot; run_boost_tests.py </div></div><div><br></div><div>but I would like to see:</div><div><br></div><div>&quot;C:\Python33\python.exe&quot; 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>