From 6086a2694e4d3442069e732646ad73baf89cca37 Mon Sep 17 00:00:00 2001 From: eduponz Date: Thu, 18 Jul 2024 12:53:21 +0200 Subject: [PATCH 1/3] Refs #21325: fastcdr/config.h is generated with version 2 Signed-off-by: eduponz --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 4690af190..0377e1f30 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -281,7 +281,7 @@ def configure_doxyfile( os.makedirs("{}/include/fastcdr".format(fastdds_repo_name), exist_ok=True) with open("{}/include/fastcdr/config.h".format(fastdds_repo_name), "w") as config_file: - config_file.write("#define FASTCDR_VERSION_MAJOR 1") + config_file.write("#define FASTCDR_VERSION_MAJOR 2") # Configure Doxyfile configure_doxyfile( From 620bd30669e69432614a52eebe78d012e8912973 Mon Sep 17 00:00:00 2001 From: eduponz Date: Sat, 20 Jul 2024 07:11:22 +0200 Subject: [PATCH 2/3] Refs #21325: Define FASTDDS_DOCS_BUILD when calling swig CLI Signed-off-by: eduponz --- docs/conf.py | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 0377e1f30..18ce00aab 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -279,10 +279,6 @@ def configure_doxyfile( os.makedirs(os.path.dirname(output_dir), exist_ok=True) os.makedirs(os.path.dirname(doxygen_html), exist_ok=True) - os.makedirs("{}/include/fastcdr".format(fastdds_repo_name), exist_ok=True) - with open("{}/include/fastcdr/config.h".format(fastdds_repo_name), "w") as config_file: - config_file.write("#define FASTCDR_VERSION_MAJOR 2") - # Configure Doxyfile configure_doxyfile( doxyfile_in, @@ -299,16 +295,23 @@ def configure_doxyfile( sys.exit(doxygen_ret) # Generate SWIG code. - swig_ret = subprocess.call('swig -python -doxygen -I{}/include \ - -outdir {}/fastdds_python/src/swig -c++ -interface \ - _fastdds_python -o \ - {}/fastdds_python/src/swig/fastddsPYTHON_wrap.cxx \ - {}/fastdds_python/src/swig/fastdds.i'.format( - fastdds_repo_name, - fastdds_python_repo_name, - fastdds_python_repo_name, - fastdds_python_repo_name - ), shell=True) + swig_ret = subprocess.call('swig \ + -python \ + -doxygen \ + -I{}/include \ + -DFASTDDS_DOCS_BUILD \ + -outdir {}/fastdds_python/src/swig \ + -c++ \ + -interface \ + _fastdds_python \ + -o {}/fastdds_python/src/swig/fastddsPYTHON_wrap.cxx \ + {}/fastdds_python/src/swig/fastdds.i'.format( + fastdds_repo_name, + fastdds_python_repo_name, + fastdds_python_repo_name, + fastdds_python_repo_name + ), shell=True) + if swig_ret != 0: print('SWIG failed with return code {}'.format(swig_ret)) sys.exit(swig_ret) From b55f398c20b8ff1921337b2c1122c22b93801e92 Mon Sep 17 00:00:00 2001 From: eduponz Date: Wed, 24 Jul 2024 09:00:53 +0200 Subject: [PATCH 3/3] Refs #21325: Apply Ricardo's suggestion Signed-off-by: eduponz --- docs/conf.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 18ce00aab..1a3ef393c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -302,8 +302,7 @@ def configure_doxyfile( -DFASTDDS_DOCS_BUILD \ -outdir {}/fastdds_python/src/swig \ -c++ \ - -interface \ - _fastdds_python \ + -interface _fastdds_python \ -o {}/fastdds_python/src/swig/fastddsPYTHON_wrap.cxx \ {}/fastdds_python/src/swig/fastdds.i'.format( fastdds_repo_name,