what does the line file(GLOB sources "${PROJECTSOURCEDIR}/include/testy/*.h"…
- User
what does the line file(GLOB sources "{PROJECT_SOURCE_DIR}/src/*.c") in cmakelist mean
- Assistant
In a
CMakeLists.txtfile, thefile(GLOB ...)command is used to create a list of files that match given globbing expressions. Let's break down the specific line you've mentioned for a clear understanding:file(GLOB sources
This part of the line indicates that the command is about to define a variable namedsourcesbased on the files that match the patterns specified in the arguments that follow. The option tells CMake to search for files matching the patterns that are about to be defined. The files that match these patterns will be stored in the variable.