Commit 6724a362c3bdda5b305bf54d092565fe5b1facac

Authored by Jay Berkenbilt
1 parent 7882b85b

Move generate_auto_job to the top-level CMakeLists.txt

CMakeLists.txt
@@ -280,6 +280,31 @@ if(WIN32) @@ -280,6 +280,31 @@ if(WIN32)
280 include(InstallRequiredSystemLibraries) 280 include(InstallRequiredSystemLibraries)
281 endif() 281 endif()
282 282
  283 +set(auto_job_inputs
  284 + # Keep in sync with SOURCES in generate_auto_job
  285 + generate_auto_job
  286 + manual/_ext/qpdf.py
  287 + job.yml
  288 + manual/cli.rst)
  289 +
  290 +set(auto_job_outputs
  291 + # Keep in sync with DESTS in generate_auto_job
  292 + libqpdf/qpdf/auto_job_decl.hh
  293 + libqpdf/qpdf/auto_job_init.hh
  294 + libqpdf/qpdf/auto_job_help.hh
  295 + libqpdf/qpdf/auto_job_schema.hh
  296 + libqpdf/qpdf/auto_job_json_decl.hh
  297 + libqpdf/qpdf/auto_job_json_init.hh)
  298 +
  299 +if(GENERATE_AUTO_JOB)
  300 + add_custom_command(
  301 + OUTPUT ${auto_job_outputs}
  302 + COMMAND ${qpdf_SOURCE_DIR}/generate_auto_job --generate
  303 + WORKING_DIRECTORY ${qpdf_SOURCE_DIR}
  304 + DEPENDS ${auto_job_inputs})
  305 + add_custom_target(auto_job_files ALL DEPENDS ${auto_job_outputs})
  306 +endif()
  307 +
283 # add_subdirectory order affects test order 308 # add_subdirectory order affects test order
284 add_subdirectory(include) 309 add_subdirectory(include)
285 add_subdirectory(libqpdf) 310 add_subdirectory(libqpdf)
generate_auto_job
@@ -154,7 +154,7 @@ class Main: @@ -154,7 +154,7 @@ class Main:
154 # SOURCES is a list of source files whose contents are used by 154 # SOURCES is a list of source files whose contents are used by
155 # this program. If they change, we are out of date. 155 # this program. If they change, we are out of date.
156 SOURCES = [ 156 SOURCES = [
157 - # Keep this list in sync with libqpdf/CMakeLists.txt: auto_job_inputs 157 + # Keep this list in sync with CMakeLists.txt: auto_job_inputs
158 whoami, 158 whoami,
159 'manual/_ext/qpdf.py', 159 'manual/_ext/qpdf.py',
160 'job.yml', 160 'job.yml',
@@ -165,7 +165,7 @@ class Main: @@ -165,7 +165,7 @@ class Main:
165 # code, are included in various places by QPDFJob.hh or any of the 165 # code, are included in various places by QPDFJob.hh or any of the
166 # implementing QPDFJob*.cc files. 166 # implementing QPDFJob*.cc files.
167 DESTS = { 167 DESTS = {
168 - # Keep this list in sync with libqpdf/CMakeLists.txt: auto_job_outputs 168 + # Keep this list in sync with CMakeLists.txt: auto_job_outputs
169 'decl': 'libqpdf/qpdf/auto_job_decl.hh', 169 'decl': 'libqpdf/qpdf/auto_job_decl.hh',
170 'init': 'libqpdf/qpdf/auto_job_init.hh', 170 'init': 'libqpdf/qpdf/auto_job_init.hh',
171 'help': 'libqpdf/qpdf/auto_job_help.hh', 171 'help': 'libqpdf/qpdf/auto_job_help.hh',
job.sums
1 # Generated by generate_auto_job 1 # Generated by generate_auto_job
2 -generate_auto_job 4282688446d9f2a432990eb337e4824e889083b529387b64129b84671ec22328 2 +generate_auto_job 0514289f2deb3bf7c1a6e85ef7d99ad120321ef5a6fe49d76c5274c6a658d3f1
3 include/qpdf/auto_job_c_att.hh 4c2b171ea00531db54720bf49a43f8b34481586ae7fb6cbf225099ee42bc5bb4 3 include/qpdf/auto_job_c_att.hh 4c2b171ea00531db54720bf49a43f8b34481586ae7fb6cbf225099ee42bc5bb4
4 include/qpdf/auto_job_c_copy_att.hh 50609012bff14fd82f0649185940d617d05d530cdc522185c7f3920a561ccb42 4 include/qpdf/auto_job_c_copy_att.hh 50609012bff14fd82f0649185940d617d05d530cdc522185c7f3920a561ccb42
5 include/qpdf/auto_job_c_enc.hh 28446f3c32153a52afa239ea40503e6cc8ac2c026813526a349e0cd4ae17ddd5 5 include/qpdf/auto_job_c_enc.hh 28446f3c32153a52afa239ea40503e6cc8ac2c026813526a349e0cd4ae17ddd5
libqpdf/CMakeLists.txt
1 -set(auto_job_inputs  
2 - # Keep in sync with SOURCES in generate_auto_job  
3 - ../generate_auto_job  
4 - ../manual/_ext/qpdf.py  
5 - ../job.yml  
6 - ../manual/cli.rst)  
7 -  
8 -set(auto_job_outputs  
9 - # Keep in sync with DESTS in generate_auto_job  
10 - qpdf/auto_job_decl.hh  
11 - qpdf/auto_job_init.hh  
12 - qpdf/auto_job_help.hh  
13 - qpdf/auto_job_schema.hh  
14 - qpdf/auto_job_json_decl.hh  
15 - qpdf/auto_job_json_init.hh)  
16 -  
17 -if(GENERATE_AUTO_JOB)  
18 - add_custom_command(  
19 - OUTPUT ${auto_job_outputs}  
20 - COMMAND ${qpdf_SOURCE_DIR}/generate_auto_job --generate  
21 - WORKING_DIRECTORY ${qpdf_SOURCE_DIR}  
22 - DEPENDS ${auto_job_inputs})  
23 - add_custom_target(auto_job_files ALL DEPENDS ${auto_job_outputs})  
24 -endif()  
25 -  
26 set(libqpdf_crypto_native 1 set(libqpdf_crypto_native
27 AES_PDF_native.cc 2 AES_PDF_native.cc
28 MD5_native.cc 3 MD5_native.cc