How to add in a CMake project a global file extension (*.pde) to GCC which is treated like C++ code

后端 未结 4 644
陌清茗
陌清茗 2020-12-18 03:40

I have a very simple CMake script. Unfortunately, the project uses a *.pde file which is plain C++ or C code.

CMake is working with any file ending, but I get a comp

4条回答
  •  春和景丽
    2020-12-18 04:01

    I decided to use this approach. I just remove the file ending by cmake in the temporary build directory. So GCC is not confused anymore because of the strange Arduino *.pde file extension.

    # Exchange the file ending of the Arduino project file
    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tinycopter.pde ${CMAKE_CURRENT_BINARY_DIR}/tinycopter.cpp)
    

提交回复
热议问题