Guards pdm_translation stub copy against codegen race
This commit is contained in:
1 parent
a318dbb64a
commit
619c7683d4
1 file changed
+12
-5
@@ -28,11 +28,18 @@ CONFIGURE_FILE(
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Copy pdm_translation.h to build directory
|
# Copy pdm_translation.h to build directory
|
||||||
CONFIGURE_FILE(
|
# Only when BUILD_GRANTLEE=OFF (stub header). With BUILD_GRANTLEE=ON the
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../../../include/ProjectDataManagement/pdm_translation.h
|
# codegen writes the real pdm_translation.h to the same build-dir path
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/pdm_translation.h
|
# (see "Generating ... pdm_translation.h" in CODEGEN_IDL_SVC); copying the
|
||||||
COPYONLY
|
# stub here would overwrite the generated file on every cmake re-configure
|
||||||
)
|
# and break incremental builds. Same guard pattern as pdm_enums.hpp below.
|
||||||
|
IF(NOT BUILD_GRANTLEE)
|
||||||
|
CONFIGURE_FILE(
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/../../../include/ProjectDataManagement/pdm_translation.h
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/pdm_translation.h
|
||||||
|
COPYONLY
|
||||||
|
)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# Copy pdm_enums.hpp to build directory (when BUILD_RTI=OFF)
|
# Copy pdm_enums.hpp to build directory (when BUILD_RTI=OFF)
|
||||||
IF(NOT BUILD_RTI)
|
IF(NOT BUILD_RTI)
|
||||||
|
|||||||
Reference in new issue
Block a user