ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

@gvdhoorn put me on the right track: indeed there are several steps in the execution of a CMakeLists.txt and it is not necessary sequential: from the CMake doc:

The execute_process() command [...] run while CMake is processing the project prior to build system generation.

A trick is impired by this SO question is to use the CODE variant of the install command, that is run last (or at least after the whole build process):

install(CODE "execute_process(COMMANDos2unix /abs/path/to/workspace/install/leg_detector/lib/laserscan_processor/laserscan_adapter.py)")

The EOL are effectively converted to the Unix format.

@gvdhoorn put me on the right track: indeed there are several steps in the execution of a CMakeLists.txt and it is not necessary sequential: from the CMake doc:

The execute_process() command [...] run while CMake is processing the project prior to build system generation.

A trick is impired by this SO question is to use the CODE variant of the install command, that is run last (or at least after the whole build process):

install(CODE "execute_process(COMMANDos2unix "execute_process(COMMAND dos2unix /abs/path/to/workspace/install/leg_detector/lib/laserscan_processor/laserscan_adapter.py)")

The EOL are effectively converted to the Unix format.

@gvdhoorn put me on the right track: indeed there are several steps in the execution of a CMakeLists.txt and it is not necessary sequential: from the CMake doc:

The execute_process() command [...] run while CMake is processing the project prior to build system generation.

A trick is impired by this SO question is to use the CODE variant of the install command, that is run last (or at least after the whole build process):

install(CODE "execute_process(COMMAND dos2unix /abs/path/to/workspace/install/leg_detector/lib/laserscan_processor/laserscan_adapter.py)")
/abs/path/to/workspace/install/leg_detector/lib/laserscan_processor/laserscan_adapter.py WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/${PROJECT_NAME}))")

The EOL are effectively converted to the Unix format.

@gvdhoorn put me on the right track: indeed there are several steps in the execution of a CMakeLists.txt and it is not necessary sequential: from the CMake doc:

The execute_process() command [...] run while CMake is processing the project prior to build system generation.

A trick is impired by this SO question is to use the CODE variant of the install command, that is run last (or at least after the whole build process):

install(CODE "execute_process(COMMAND dos2unix /abs/path/to/workspace/install/leg_detector/lib/laserscan_processor/laserscan_adapter.py laserscan_adapter.py WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/${PROJECT_NAME}))")
${CMAKE_INSTALL_PREFIX}/lib/${PROJECT_NAME})")

The EOL are effectively converted to the Unix format.

@gvdhoorn put me on the right track: indeed there are several steps in the execution of a CMakeLists.txt and it is not necessary sequential: from the CMake doc:

The execute_process() command [...] run while CMake is processing the project prior to build system generation.

A trick is impired by this SO question is to use the CODE variant of the install command, that is run last (or at least after the whole build process):

install(CODE "execute_process(COMMAND dos2unix laserscan_adapter.py laserscan_processor.py WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/${PROJECT_NAME})")

The EOL are effectively converted to the Unix format.