On 25 July 2018 at 23:47, Michael Hennebry
<[email protected]> wrote:
> Emphasis on curse.
>
> from CMakeLists.txt:
>
> file (GLOB_RECURSE ards ./ArduinoCore/src *.cpp *.c)
> file (GLOB_RECURSE apps ./SensorUnit *.cpp *.c)
Your syntax is wrong. `./ArduinoCore/src`, ` ./SensorUnit`, `*.cpp`,
`*.c` are all being treated as separate glob expressions so `*.cpp`
and `*.c` recursively match the current directory.
If you look at the signature of the function you're calling
```
file(GLOB_RECURSE <variable> [FOLLOW_SYMLINKS]
[LIST_DIRECTORIES true|false] [RELATIVE <path>]
[<globbing-expressions>...])
```
you can see that all your arguments after `ards` and `apps` are being
treated as `<globbing-expressions>`.
Instead you want something like this
file(GLOB_RECURSE ards RELATIVE ArduinoCore/src *.cpp *.c)
file (GLOB_RECURSE apps RELATIVE ./SensorUnit *.cpp *.c)
Note the use of the `RELATIVE` argument. See
https://cmake.org/cmake/help/v3.10/command/file.html for more details.
Hope that helps.
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake