File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ endforeach()
38
38
39
39
# Don't update the files in the source directory if no files were generated in the binary directory.
40
40
if (NOT FILE_NAMES )
41
- message (FATAL_ERROR "Schema generation failed!" )
41
+ message (FATAL_ERROR "Client generation failed!" )
42
42
endif ()
43
43
44
44
# Support if() IN_LIST operator: https://cmake.org/cmake/help/latest/policy/CMP0057.html
@@ -48,8 +48,10 @@ cmake_policy(SET CMP0057 NEW)
48
48
file (GLOB OLD_FILES ${CLIENT_SOURCE_DIR} /*.h ${CLIENT_SOURCE_DIR} /*.cpp )
49
49
foreach (OLD_FILE ${OLD_FILES} )
50
50
get_filename_component (OLD_FILE ${OLD_FILE} NAME )
51
- if (NOT OLD_FILE IN_LIST FILE_NAMES )
52
- file (REMOVE "${CLIENT_SOURCE_DIR} /${OLD_FILE} " )
51
+ if (NOT OLD_FILE IN_LIST FILE_NAMES AND
52
+ NOT OLD_FILE STREQUAL "${CLIENT_PREFIX} Client.h" AND
53
+ NOT OLD_FILE STREQUAL "${CLIENT_PREFIX} Client.cpp" )
54
+ message (WARNING "Unexpected file in ${CLIENT_TARGET} client sources: ${OLD_FILE} " )
53
55
endif ()
54
56
endforeach ()
55
57
Original file line number Diff line number Diff line change @@ -48,7 +48,12 @@ file(GLOB OLD_FILES ${SCHEMA_SOURCE_DIR}/*.h ${SCHEMA_SOURCE_DIR}/*.cpp)
48
48
foreach (OLD_FILE ${OLD_FILES} )
49
49
get_filename_component (OLD_FILE ${OLD_FILE} NAME )
50
50
if (NOT OLD_FILE IN_LIST FILE_NAMES )
51
- file (REMOVE "${SCHEMA_SOURCE_DIR} /${OLD_FILE} " )
51
+ if (OLD_FILE MATCHES "Object\\ .h$" OR OLD_FILE MATCHES "Object\\ .cpp$" )
52
+ file (REMOVE "${SCHEMA_SOURCE_DIR} /${OLD_FILE} " )
53
+ elseif (NOT OLD_FILE STREQUAL "${SCHEMA_PREFIX} Schema.h" AND
54
+ NOT OLD_FILE STREQUAL "${SCHEMA_PREFIX} Schema.cpp" )
55
+ message (WARNING "Unexpected file in ${SCHEMA_TARGET} GraphQL schema sources: ${OLD_FILE} " )
56
+ endif ()
52
57
endif ()
53
58
endforeach ()
54
59
You can’t perform that action at this time.
0 commit comments