Skip to content

Commit

Permalink
build: fix rpcgen problem on FreeBSD
Browse files Browse the repository at this point in the history
rpcgen on FreeBSD and on Linux store the generated files in different
directories, either where the source file is stored or into the current
directory.

We now check both options to copy the generated files when being built
outside of the source tree.
  • Loading branch information
pstorz committed Jul 6, 2018
1 parent 0b11093 commit 9e51eac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/ndmp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ foreach(NDMP_VERSION 0 1 2 3 4 9)
PRE_BUILD
OUTPUT ndmp${NDMP_VERSION}.h ndmp${NDMP_VERSION}_xdr.c
COMMAND ${RPCGEN} ${RPCGEN_PARAMS} ${CMAKE_CURRENT_SOURCE_DIR}/ndmp${NDMP_VERSION}.x
COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/ndmp${NDMP_VERSION}.h ${CMAKE_CURRENT_SOURCE_DIR}/ndmp${NDMP_VERSION}_xdr.c ${CMAKE_CURRENT_BINARY_DIR}
COMMAND cp ndmp${NDMP_VERSION}.h ndmp${NDMP_VERSION}_xdr.c ${CMAKE_CURRENT_SOURCE_DIR}
|| cp ${CMAKE_CURRENT_SOURCE_DIR}/ndmp${NDMP_VERSION}.h ${CMAKE_CURRENT_SOURCE_DIR}/ndmp${NDMP_VERSION}_xdr.c ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${RPCGEN} ${CMAKE_CURRENT_SOURCE_DIR}/ndmp${NDMP_VERSION}.x
)
ENDIF()
Expand Down

0 comments on commit 9e51eac

Please sign in to comment.