mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 03:10:02 +02:00
fixed cmake command
This commit is contained in:
parent
aa10c4665f
commit
e10ebe33d7
@ -63,9 +63,12 @@ configure_file(
|
|||||||
"${SPHINX_BUILD}/gen_server_doc.py"
|
"${SPHINX_BUILD}/gen_server_doc.py"
|
||||||
@ONLY)
|
@ONLY)
|
||||||
|
|
||||||
|
|
||||||
|
add_custom_target(server_rst python gen_server_doc.py)
|
||||||
|
|
||||||
add_custom_target(docs
|
add_custom_target(docs
|
||||||
gendoc
|
gendoc
|
||||||
python gen_server_doc.py
|
COMMAND python gen_server_doc.py
|
||||||
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
|
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
|
||||||
COMMAND ${SPHINX_EXECUTABLE} -a -b html
|
COMMAND ${SPHINX_EXECUTABLE} -a -b html
|
||||||
-Dbreathe_projects.slsDetectorPackage=${CMAKE_CURRENT_BINARY_DIR}/xml
|
-Dbreathe_projects.slsDetectorPackage=${CMAKE_CURRENT_BINARY_DIR}/xml
|
||||||
@ -82,4 +85,3 @@ add_custom_target(rst
|
|||||||
${SPHINX_BUILD}/html
|
${SPHINX_BUILD}/html
|
||||||
COMMENT "Generating documentation with Sphinx")
|
COMMENT "Generating documentation with Sphinx")
|
||||||
|
|
||||||
add_custom_target(server_rst python gen_server_doc.py)
|
|
@ -2,15 +2,21 @@ import os
|
|||||||
import re
|
import re
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# @CMAKE_CURRENT_BINARY_DIR@
|
# @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:
|
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 = f.read().replace('\\\n', '')
|
||||||
lines = lines.splitlines(keepends = True)
|
lines = lines.splitlines(keepends = True)
|
||||||
|
|
||||||
@ -38,6 +44,10 @@ for det in detectors:
|
|||||||
|
|
||||||
|
|
||||||
rstpath = Path('@CMAKE_SOURCE_DIR@')/'docs/src/'
|
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)
|
f.writelines(output)
|
||||||
|
|
||||||
|
print('END\n\n\n\n')
|
@ -23,7 +23,7 @@ Moench
|
|||||||
-------------
|
-------------
|
||||||
|
|
||||||
.. csv-table:: Default values
|
.. csv-table:: Default values
|
||||||
:file: moech.csv
|
:file: moench.csv
|
||||||
:widths: 35, 35
|
:widths: 35, 35
|
||||||
:header-rows: 1
|
:header-rows: 1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user