2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 10:58:58 +00:00

Fix build logic around generate_auto_job

It was being run at configuration time, not build time.
This commit is contained in:
Jay Berkenbilt 2022-04-24 12:46:43 -04:00
parent 08ba21cf49
commit 63c5a56f38
3 changed files with 23 additions and 3 deletions

View File

@ -154,6 +154,7 @@ class Main:
# SOURCES is a list of source files whose contents are used by
# this program. If they change, we are out of date.
SOURCES = [
# Keep this list in sync with libqpdf/CMakeLists.txt: auto_job_inputs
whoami,
'manual/_ext/qpdf.py',
'job.yml',
@ -164,6 +165,7 @@ class Main:
# code, are included in various places by QPDFJob.hh or any of the
# implementing QPDFJob*.cc files.
DESTS = {
# Keep this list in sync with libqpdf/CMakeLists.txt: auto_job_outputs
'decl': 'libqpdf/qpdf/auto_job_decl.hh',
'init': 'libqpdf/qpdf/auto_job_init.hh',
'help': 'libqpdf/qpdf/auto_job_help.hh',

View File

@ -1,5 +1,5 @@
# Generated by generate_auto_job
generate_auto_job 86109dcb8646dca3f50b6ff92d460c62fcd98a5c95d47276b7c1217f4430271e
generate_auto_job 4282688446d9f2a432990eb337e4824e889083b529387b64129b84671ec22328
include/qpdf/auto_job_c_att.hh 4c2b171ea00531db54720bf49a43f8b34481586ae7fb6cbf225099ee42bc5bb4
include/qpdf/auto_job_c_copy_att.hh 50609012bff14fd82f0649185940d617d05d530cdc522185c7f3920a561ccb42
include/qpdf/auto_job_c_enc.hh 28446f3c32153a52afa239ea40503e6cc8ac2c026813526a349e0cd4ae17ddd5

View File

@ -1,8 +1,26 @@
set(auto_job_inputs
# Keep in sync with SOURCES in generate_auto_job
../generate_auto_job
../manual/_ext/qpdf.py
../job.yml
../manual/cli.rst)
set(auto_job_outputs
# Keep in sync with DESTS in generate_auto_job
qpdf/auto_job_decl.hh
qpdf/auto_job_init.hh
qpdf/auto_job_help.hh
qpdf/auto_job_schema.hh
qpdf/auto_job_json_decl.hh
qpdf/auto_job_json_init.hh)
if(GENERATE_AUTO_JOB)
execute_process(
add_custom_command(
OUTPUT ${auto_job_outputs}
COMMAND ${qpdf_SOURCE_DIR}/generate_auto_job --generate
WORKING_DIRECTORY ${qpdf_SOURCE_DIR})
WORKING_DIRECTORY ${qpdf_SOURCE_DIR}
DEPENDS ${auto_job_inputs})
add_custom_target(auto_job_files ALL DEPENDS ${auto_job_outputs})
endif()
set(libqpdf_crypto_native