diff options
-rw-r--r-- | CAN-binder/CMakeLists.txt | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/CAN-binder/CMakeLists.txt b/CAN-binder/CMakeLists.txt index ec910897..b6c51eb4 100644 --- a/CAN-binder/CMakeLists.txt +++ b/CAN-binder/CMakeLists.txt @@ -54,11 +54,17 @@ endmacro(fill_include_dir) # Helper function to retrieve source files from a library repo. function(find_source_files path) - file(GLOB_RECURSE filelist "${path}/*.[cpx]") - foreach(filename ${filelist}) - if(NOT ${filename} MATCHES ".*(test|example|sample).*") + file(GLOB_RECURSE cfiles "${path}/*.[c]") + file(GLOB_RECURSE cppfiles "${path}/*.cpp") + foreach(filename ${cfiles}) + if(NOT ${filename} MATCHES ".*([Tt]est|[Ee]xample|[Ss]ample).*") string(APPEND sources "${filename};") - endif(NOT ${filename} MATCHES ".*(test|example|sample).*") + endif(NOT ${filename} MATCHES ".*([Tt]est|[Ee]xample|[Ss]ample).*") + endforeach() + foreach(filename ${cppfiles}) + if(NOT ${filename} MATCHES ".*([Tt]est|[Ee]xample|[Ss]ample).*") + string(APPEND sources "${filename};") + endif(NOT ${filename} MATCHES ".*([Tt]est|[Ee]xample|[Ss]ample).*") endforeach() set(sources_files ${sources} PARENT_SCOPE) endfunction(find_source_files) |