Unverified Commit 1097343d authored by Kenton Varda's avatar Kenton Varda Committed by GitHub

Merge pull request #587 from harrishancock/fix-capnp_generate_cpp-source-file-check

Fix input schema file existence check in capnp_generate_cpp
parents 5f7b19b8 ae8859ce
......@@ -71,11 +71,11 @@ function(CAPNP_GENERATE_CPP SOURCES HEADERS)
set(${SOURCES})
set(${HEADERS})
foreach(schema_file ${ARGN})
if(NOT EXISTS "${CAPNPC_SRC_PREFIX}/${schema_file}")
message(FATAL_ERROR "Cap'n Proto schema file '${CAPNPC_SRC_PREFIX}/${schema_file}' does not exist!")
endif()
get_filename_component(file_path "${schema_file}" ABSOLUTE)
get_filename_component(file_dir "${file_path}" PATH)
if(NOT EXISTS "${file_path}")
message(FATAL_ERROR "Cap'n Proto schema file '${file_path}' does not exist!")
endif()
# Figure out where the output files will go
if (NOT DEFINED CAPNPC_OUTPUT_DIR)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment