fixed cmake command

This commit is contained in:
Erik Frojdh 2020-09-11 17:25:27 +02:00
parent aa10c4665f
commit e10ebe33d7
3 changed files with 19 additions and 7 deletions

View File

@ -63,9 +63,12 @@ configure_file(
"${SPHINX_BUILD}/gen_server_doc.py"
@ONLY)
add_custom_target(server_rst python gen_server_doc.py)
add_custom_target(docs
gendoc
python gen_server_doc.py
COMMAND python gen_server_doc.py
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
COMMAND ${SPHINX_EXECUTABLE} -a -b html
-Dbreathe_projects.slsDetectorPackage=${CMAKE_CURRENT_BINARY_DIR}/xml
@ -82,4 +85,3 @@ add_custom_target(rst
${SPHINX_BUILD}/html
COMMENT "Generating documentation with Sphinx")
add_custom_target(server_rst python gen_server_doc.py)

View File

@ -2,15 +2,21 @@ import os
import re
from pathlib import Path
# @CMAKE_CURRENT_BINARY_DIR@
src = Path('@CMAKE_SOURCE_DIR@')/'slsDetectorServers/'
print('\n\n\n\n SERVER CSV')
detectors = ['Mythen3', 'Gotthard2', 'Eiger', 'Jungfrau', 'Moench', 'Gotthard', 'Ctb']
src = Path('@CMAKE_SOURCE_DIR@')/'slsDetectorServers/'
detectors = ['Mythen3', 'Gotthard2', 'Eiger',
'Jungfrau', 'Moench', 'Gotthard', 'Ctb']
for det in detectors:
with open(src/f'{det.lower()}DetectorServer/slsDetectorServer_defs.h') as f:
in_fname = src/f'{det.lower()}DetectorServer/slsDetectorServer_defs.h'
print(f'Reading: {in_fname}')
with open(in_fname) as f:
lines = f.read().replace('\\\n', '')
lines = lines.splitlines(keepends = True)
@ -38,6 +44,10 @@ for det in detectors:
rstpath = Path('@CMAKE_SOURCE_DIR@')/'docs/src/'
with open(f'src/{det.lower()}.csv', 'w') as f:
out_fname = Path.cwd()/f'src/{det.lower()}.csv'
print(f'Writing: {out_fname}')
with open(out_fname, 'w') as f:
f.writelines(output)
print('END\n\n\n\n')

View File

@ -23,7 +23,7 @@ Moench
-------------
.. csv-table:: Default values
:file: moech.csv
:file: moench.csv
:widths: 35, 35
:header-rows: 1