diff --git a/tools/export/cmake/CMakeLists.txt.tmpl b/tools/export/cmake/CMakeLists.txt.tmpl index 544e1af32ec..b3b38ad3d5b 100644 --- a/tools/export/cmake/CMakeLists.txt.tmpl +++ b/tools/export/cmake/CMakeLists.txt.tmpl @@ -103,4 +103,7 @@ IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/project.cmake) INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/project.cmake) ELSE() MESSAGE(STATUS "Add a local project.cmake file to add your own targets.") -ENDIF() \ No newline at end of file +ENDIF() + +# this will take care of binary directories generated by cmake/clion not to confuse the cli build +FILE(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/.mbedignore" CONTENT "*")