fix cmake check

This commit is contained in:
me-no-dev
2020-05-12 00:22:37 +03:00
parent 3735cfe548
commit c070e7152b
3 changed files with 7 additions and 4 deletions

View File

@ -15,9 +15,9 @@ git submodule update --init --recursive
REPO_SRCS=`find cores/esp32/ libraries/ -name 'examples' -prune -o -name '*.c' -print -o -name '*.cpp' -print | sort`
# find all source files named in CMakeLists.txt COMPONENT_SRCS
CMAKE_SRCS=`cmake --trace-expand -C CMakeLists.txt 2>&1 | grep COMPONENT_SRCS | sed 's/.\+COMPONENT_SRCS //' | sed 's/ )//' | tr ' ;' '\n' | sort`
CMAKE_SRCS=`cmake --trace-expand -C CMakeLists.txt 2>&1 | grep set\(srcs | cut -d'(' -f3 | sed 's/ )//' | sed 's/srcs //' | tr ' ;' '\n' | sort`
if ! diff -u0 --label "Repo Files" --label "COMPONENT_SRCS" <(echo "$REPO_SRCS") <(echo "$CMAKE_SRCS"); then
if ! diff -u0 --label "Repo Files" --label "srcs" <(echo "$REPO_SRCS") <(echo "$CMAKE_SRCS"); then
echo "Source files in repo (-) and source files in CMakeLists.txt (+) don't match"
echo "Edit CMakeLists.txt as appropriate to add/remove source files from COMPONENT_SRCS"
exit 1

View File

@ -112,4 +112,7 @@ void loop() {
// put your main code here, to run repeatedly:
delay(10000);
}
#endif
#else
void setup(){}
void loop(){}
#endif

View File

@ -661,4 +661,4 @@ void startCameraServer(){
httpd_register_uri_handler(stream_httpd, &stream_uri);
}
}
#endif
#endif