Skip to content

Commit 47bc6ff

Browse files
committed
Make the generate_cpp custom targets depend explicitly on FEDEX_OUT files, which are in turn generated by the preceeding custom command. This is an attempt to improve parallel building.
1 parent c269cd8 commit 47bc6ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

data/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ FUNCTION(BUILD_A_SCHEMA SCHEMA_FILE)
6060
# seems to be set_target_properties( <target> PROPERTIES COMPILE_FLAGS <flags> )
6161
set( ${PROJECT_NAME}_COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR} -I${SC_SOURCE_DIR}/src/cldai -I${SC_SOURCE_DIR}/src/cleditor -I${SC_SOURCE_DIR}/src/clutils -I${SCHEMA_OUTPUT_DIR} -I${SC_SOURCE_DIR}/src/clstepcore -I${SC_SOURCE_DIR}/src/base" )
6262

63-
add_custom_target( generate_cpp_${SCHEMA_SHORT_NAME} SOURCES ${FEDEX_OUT} )
6463
add_custom_command( OUTPUT ${SCHEMA_OUTPUT_DIR}
6564
COMMAND ${CMAKE_COMMAND} ARGS -E make_directory ${SCHEMA_OUTPUT_DIR}
6665
COMMENT "Creating ${SCHEMA_OUTPUT_DIR} for schema ${SCHEMA_SHORT_NAME}")
@@ -70,6 +69,7 @@ FUNCTION(BUILD_A_SCHEMA SCHEMA_FILE)
7069
WORKING_DIRECTORY ${SCHEMA_OUTPUT_DIR}
7170
COMMENT "Running fedex_plus for ${SCHEMA_SHORT_NAME}..."
7271
VERBATIM )
72+
add_custom_target( generate_cpp_${SCHEMA_SHORT_NAME} DEPENDS ${FEDEX_OUT} SOURCES ${FEDEX_OUT} )
7373

7474
if( SC_ENABLE_COVERAGE AND NOT SC_COVER_SCHEMAS )
7575
# Coverage will always be sparse on schema libs. Compiling the libs with the -fprofile-arcs and

0 commit comments

Comments
 (0)