From f6fcfe7011f3e370b2fffd1409779ceb5a9fc78a Mon Sep 17 00:00:00 2001 From: Lauren Wrubleski Date: Thu, 11 Apr 2024 16:44:02 -0600 Subject: [PATCH] HOTFIX: Update version number and changelog for ROCm 6.1 (#184) * Update version number and changelog for ROCm 6.1 * Update documentation to match ROCm (#142) * Update documentation requirements files * Disable docsphinx test on macOS (#167) --------- Co-authored-by: Sam Wu --- .github/dependabot.yml | 17 ++ .github/workflows/test.yml | 3 +- .gitignore | 4 +- .readthedocs.yaml | 18 ++ CHANGELOG.md | 12 ++ CMakeLists.txt | 4 +- README.md | 15 +- doc/CMakeLists.txt | 5 - docs/CMakeLists.txt | 5 + doc/requirements.txt => docs/requirements.in | 4 +- docs/requirements.txt | 161 ++++++++++++++++++ docs/src/_toc.yml.in | 45 +++++ {doc => docs}/src/conf.py | 58 +++---- {doc => docs}/src/index.rst | 32 +++- docs/src/license.rst | 4 + .../src/reference}/ROCMAnalyzers.rst | 2 - .../src/reference}/ROCMCheckTargetIds.rst | 0 .../src/reference}/ROCMClangTidy.rst | 0 .../src/reference}/ROCMClients.rst | 3 +- .../src/reference}/ROCMCppCheck.rst | 0 .../src/reference}/ROCMCreatePackage.rst | 0 {doc/src => docs/src/reference}/ROCMDocs.rst | 0 .../src/reference}/ROCMDoxygenDoc.rst | 0 .../src/reference}/ROCMHeaderWrapper.rst | 10 +- .../src/reference}/ROCMInstallSymlinks.rst | 0 .../src/reference}/ROCMInstallTargets.rst | 13 +- .../reference}/ROCMPackageConfigHelpers.rst | 0 .../src/reference}/ROCMSetupVersion.rst | 0 .../src/reference}/ROCMSphinxDoc.rst | 0 {doc/src => docs/src/reference}/ROCMTest.rst | 0 .../src/reference}/ROCMUtilities.rst | 7 +- test/docsphinx/docs/.sphinx/requirements.in | 3 +- test/docsphinx/docs/.sphinx/requirements.txt | 39 +++-- test/pass/doc-sphinxdoxygen.cmake | 10 +- 34 files changed, 384 insertions(+), 90 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .readthedocs.yaml delete mode 100755 doc/CMakeLists.txt create mode 100755 docs/CMakeLists.txt rename doc/requirements.txt => docs/requirements.in (60%) mode change 100755 => 100644 create mode 100644 docs/requirements.txt create mode 100644 docs/src/_toc.yml.in rename {doc => docs}/src/conf.py (67%) rename {doc => docs}/src/index.rst (70%) create mode 100644 docs/src/license.rst rename {doc/src => docs/src/reference}/ROCMAnalyzers.rst (98%) rename {doc/src => docs/src/reference}/ROCMCheckTargetIds.rst (100%) rename {doc/src => docs/src/reference}/ROCMClangTidy.rst (100%) rename {doc/src => docs/src/reference}/ROCMClients.rst (89%) rename {doc/src => docs/src/reference}/ROCMCppCheck.rst (100%) rename {doc/src => docs/src/reference}/ROCMCreatePackage.rst (100%) rename {doc/src => docs/src/reference}/ROCMDocs.rst (100%) rename {doc/src => docs/src/reference}/ROCMDoxygenDoc.rst (100%) rename {doc/src => docs/src/reference}/ROCMHeaderWrapper.rst (94%) rename {doc/src => docs/src/reference}/ROCMInstallSymlinks.rst (100%) rename {doc/src => docs/src/reference}/ROCMInstallTargets.rst (81%) rename {doc/src => docs/src/reference}/ROCMPackageConfigHelpers.rst (100%) rename {doc/src => docs/src/reference}/ROCMSetupVersion.rst (100%) rename {doc/src => docs/src/reference}/ROCMSphinxDoc.rst (100%) rename {doc/src => docs/src/reference}/ROCMTest.rst (100%) rename {doc/src => docs/src/reference}/ROCMUtilities.rst (91%) diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..c03986bc --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,17 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +version: 2 +updates: + - package-ecosystem: "pip" # See documentation for possible values + directory: "/docs" # Location of package manifests + open-pull-requests-limit: 10 + schedule: + interval: "daily" + labels: + - "documentation" + - "dependencies" + - "ci:docs-only" + reviewers: + - "samjwu" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0db9456a..6a4787ab 100755 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -56,7 +56,7 @@ jobs: run: | python -m pip install --upgrade setuptools pip wheel python -m pip install cget ninja - python -m pip install -r doc/requirements.txt + python -m pip install -r docs/requirements.txt python -m pip install -r test/docsphinx/docs/.sphinx/requirements.txt - name: Install Doxygen uses: ssciwr/doxygen-install@v1 @@ -69,4 +69,3 @@ jobs: cget build -T doc cget build -Cy --test -DROCM_CMAKE_GENERATOR=Ninja cget build -T doc - diff --git a/.gitignore b/.gitignore index 564b2b12..9cb4d6ae 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ .vs*/**/* -build/**/* \ No newline at end of file +build/**/* +docs/_build/ +docs/sphinx/_toc.yml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..584eeb31 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,18 @@ +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +version: 2 + +sphinx: + configuration: docs/src/conf.py + +formats: [htmlzip, pdf, epub] + +python: + install: + - requirements: docs/requirements.txt + +build: + os: ubuntu-22.04 + tools: + python: "3.8" diff --git a/CHANGELOG.md b/CHANGELOG.md index bda5f369..d5602120 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Change Log for rocm-cmake +## [rocm-cmake 0.12.0 for ROCm 6.1.0] +### Changed +- ROCMSphinxDoc: Allow separate source and config directories. +- ROCMCreatePackage: Allow additional `PROVIDES` on header-only packages. +- ROCMInstallTargets: Don't install executable targets by default for ASAN builds. +- ROCMTest: Add RPATH for installed tests. +- Finalize rename to ROCmCMakeBuildTools +### Fixed +- ROCMClangTidy: Fixed invalid list index. +- Test failures when ROCM_CMAKE_GENERATOR is empty. + + ## [rocm-cmake 0.11.0 for ROCm 6.0.0] ### Changed - ROCMSphinxDoc: Improved validation, documentation and rocm-docs-core integration. diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ac51890..330c8eed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/share/rocmcmakebuildtool include(ROCMCreatePackage) include(ROCMSetupVersion) -rocm_setup_version(VERSION 0.11.0) +rocm_setup_version(VERSION 0.12.0) include(CMakePackageConfigHelpers) write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/ROCmCMakeBuildToolsConfigVersion.cmake @@ -43,4 +43,4 @@ add_custom_target(format COMMAND cmake-format -i ${CMAKE_FILES} WORKING_DIRECTOR enable_testing() add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C ${CMAKE_CFG_INTDIR}) add_subdirectory(test) -add_subdirectory(doc) +add_subdirectory(docs) diff --git a/README.md b/README.md index 34c81c91..5f7cb096 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -rocm-cmake -================== +# rocm-cmake rocm-cmake is a collection of CMake modules for common build and development tasks within the ROCm project. It is therefore a build dependency for many of @@ -10,8 +9,10 @@ it is required for building some of the libraries that are _a part of_ ROCm. To install from source, run: - mkdir build - cd build - cmake .. - cmake --build . - sudo cmake --build . --target install +```bash +mkdir build +cd build +cmake .. +cmake --build . +sudo cmake --build . --target install +``` diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt deleted file mode 100755 index af019697..00000000 --- a/doc/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -include(ROCMSphinxDoc) -rocm_add_sphinx_doc(src - BUILDER html - OUTPUT_DIR html -) diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt new file mode 100755 index 00000000..b332e7e4 --- /dev/null +++ b/docs/CMakeLists.txt @@ -0,0 +1,5 @@ +include(ROCMSphinxDoc) +rocm_add_sphinx_doc(${CMAKE_CURRENT_LIST_DIR}/src + BUILDER html + OUTPUT_DIR html +) diff --git a/doc/requirements.txt b/docs/requirements.in old mode 100755 new mode 100644 similarity index 60% rename from doc/requirements.txt rename to docs/requirements.in index 9098dc6b..daacbe30 --- a/doc/requirements.txt +++ b/docs/requirements.in @@ -1,2 +1,2 @@ -sphinx==4.1.2 -sphinxcontrib-moderncmakedomain==3.19 +sphinxcontrib-moderncmakedomain==3.19 +rocm-docs-core==0.38.1 diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 00000000..fe3e304e --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,161 @@ +# +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: +# +# pip-compile requirements.in +# +accessible-pygments==0.0.4 + # via pydata-sphinx-theme +alabaster==0.7.13 + # via sphinx +babel==2.14.0 + # via + # pydata-sphinx-theme + # sphinx +beautifulsoup4==4.12.3 + # via pydata-sphinx-theme +breathe==4.35.0 + # via rocm-docs-core +certifi==2023.11.17 + # via requests +cffi==1.16.0 + # via + # cryptography + # pynacl +charset-normalizer==3.3.2 + # via requests +click==8.1.7 + # via sphinx-external-toc +cryptography==41.0.7 + # via pyjwt +deprecated==1.2.14 + # via pygithub +docutils==0.19 + # via + # breathe + # myst-parser + # pydata-sphinx-theme + # sphinx +fastjsonschema==2.19.1 + # via rocm-docs-core +gitdb==4.0.11 + # via gitpython +gitpython==3.1.41 + # via rocm-docs-core +idna==3.6 + # via requests +imagesize==1.4.1 + # via sphinx +importlib-metadata==7.0.1 + # via sphinx +importlib-resources==6.1.1 + # via rocm-docs-core +jinja2==3.1.3 + # via + # myst-parser + # sphinx +markdown-it-py==2.2.0 + # via + # mdit-py-plugins + # myst-parser +markupsafe==2.1.3 + # via jinja2 +mdit-py-plugins==0.3.5 + # via myst-parser +mdurl==0.1.2 + # via markdown-it-py +myst-parser==1.0.0 + # via rocm-docs-core +packaging==23.2 + # via + # pydata-sphinx-theme + # sphinx +pycparser==2.21 + # via cffi +pydata-sphinx-theme==0.14.4 + # via + # rocm-docs-core + # sphinx-book-theme +pygithub==2.1.1 + # via rocm-docs-core +pygments==2.17.2 + # via + # accessible-pygments + # pydata-sphinx-theme + # sphinx +pyjwt[crypto]==2.8.0 + # via pygithub +pynacl==1.5.0 + # via pygithub +python-dateutil==2.8.2 + # via pygithub +pytz==2023.3.post1 + # via babel +pyyaml==6.0.1 + # via + # myst-parser + # rocm-docs-core + # sphinx-external-toc +requests==2.31.0 + # via + # pygithub + # sphinx +rocm-docs-core==0.38.1 + # via -r requirements.in +six==1.16.0 + # via python-dateutil +smmap==5.0.1 + # via gitdb +snowballstemmer==2.2.0 + # via sphinx +soupsieve==2.5 + # via beautifulsoup4 +sphinx==5.3.0 + # via + # breathe + # myst-parser + # pydata-sphinx-theme + # rocm-docs-core + # sphinx-book-theme + # sphinx-copybutton + # sphinx-design + # sphinx-external-toc + # sphinx-notfound-page +sphinx-book-theme==1.0.1 + # via rocm-docs-core +sphinx-copybutton==0.5.2 + # via rocm-docs-core +sphinx-design==0.5.0 + # via rocm-docs-core +sphinx-external-toc==0.3.1 + # via rocm-docs-core +sphinx-notfound-page==1.0.0 + # via rocm-docs-core +sphinxcontrib-applehelp==1.0.4 + # via sphinx +sphinxcontrib-devhelp==1.0.2 + # via sphinx +sphinxcontrib-htmlhelp==2.0.1 + # via sphinx +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-moderncmakedomain==3.19 + # via -r requirements.in +sphinxcontrib-qthelp==1.0.3 + # via sphinx +sphinxcontrib-serializinghtml==1.1.5 + # via sphinx +typing-extensions==4.9.0 + # via + # pydata-sphinx-theme + # pygithub +urllib3==2.1.0 + # via + # pygithub + # requests +wrapt==1.16.0 + # via deprecated +zipp==3.17.0 + # via + # importlib-metadata + # importlib-resources diff --git a/docs/src/_toc.yml.in b/docs/src/_toc.yml.in new file mode 100644 index 00000000..23256060 --- /dev/null +++ b/docs/src/_toc.yml.in @@ -0,0 +1,45 @@ +# Variables of the form ${} are substituted, currently the following +# list is supported: +# - ${branch} (or {branch}) the name of the current branch +# - ${url} (or {url}) github url of the current project +# - ${project:} base url of the documentation of +# based on intersphinx_mapping. +# These comments will also be removed. +defaults: + numbered: False + maxdepth: 6 +root: index.rst +subtrees: + - caption: Basic Common Functionality + entries: + - file: reference/ROCMCheckTargetIds.rst + - file: reference/ROCMSetupVersion.rst + - file: reference/ROCMAnalyzers.rst + - caption: Installation & Packaging + entries: + - file: reference/ROCMInstallTargets.rst + subtrees: + - entries: + - file: reference/ROCMInstallSymlinks.rst + - file: reference/ROCMHeaderWrapper.rst + - file: reference/ROCMCreatePackage.rst + subtrees: + - entries: + - file: reference/ROCMClients.rst + - file: reference/ROCMPackageConfigHelpers.rst + - caption: Standard Tooling + entries: + - file: reference/ROCMClangTidy.rst + - file: reference/ROCMCppCheck.rst + - file: reference/ROCMTest.rst + - caption: Documentation in CMake + entries: + - file: reference/ROCMDocs.rst + - file: reference/ROCMDoxygenDoc.rst + - file: reference/ROCMSphinxDoc.rst + - caption: Internal usage + entries: + - file: reference/ROCMUtilities.rst + - caption: About + entries: + - file: license.rst diff --git a/doc/src/conf.py b/docs/src/conf.py similarity index 67% rename from doc/src/conf.py rename to docs/src/conf.py index 4c42fb9a..d5a0d3cb 100755 --- a/doc/src/conf.py +++ b/docs/src/conf.py @@ -4,6 +4,8 @@ # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html +import re + # -- Path setup -------------------------------------------------------------- # If extensions (or modules to document with autodoc) are in another directory, @@ -14,13 +16,13 @@ # import sys # sys.path.insert(0, os.path.abspath('.')) - # -- Project information ----------------------------------------------------- -project = 'rocm-cmake' -copyright = '2021, Paul Fultz II' -author = 'Paul Fultz II' +setting_all_article_info = True + +external_projects_current_project = "rocmcmakebuildtools" +project = 'ROCmCMakeBuildTools' # -- General configuration --------------------------------------------------- @@ -28,9 +30,13 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'sphinxcontrib.moderncmakedomain' + 'sphinxcontrib.moderncmakedomain', + "rocm_docs" ] +external_toc_path = "./_toc.yml" +external_toc_template_path = "./_toc.yml.in" + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -39,35 +45,29 @@ # This pattern also affects html_static_path and html_extra_path. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] - # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -# -html_theme = 'default' -html_theme_options = { - 'footerbgcolor': '#00182d', - 'footertextcolor': '#ffffff', - 'sidebarbgcolor': '#e4ece8', - 'sidebarbtncolor': '#00a94f', - 'sidebartextcolor': '#333333', - 'sidebarlinkcolor': '#00a94f', - 'relbarbgcolor': '#00529b', - 'relbartextcolor': '#ffffff', - 'relbarlinkcolor': '#ffffff', - 'bgcolor': '#ffffff', - 'textcolor': '#444444', - 'headbgcolor': '#f2f2f2', - 'headtextcolor': '#003564', - 'headlinkcolor': '#3d8ff2', - 'linkcolor': '#2b63a8', - 'visitedlinkcolor': '#2b63a8', - 'codebgcolor': '#eeeeee', - 'codetextcolor': '#333333', -} + +html_theme = 'rocm_docs_theme' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] \ No newline at end of file +html_static_path = ['_static'] + +with open('../../CMakeLists.txt', encoding='utf-8') as f: + match = re.search(r'rocm_setup_version\(VERSION\s+\"?([0-9.]+)[^0-9.]+', f.read()) + if not match: + raise ValueError("VERSION not found!") + version_number = match[1] + +version = version_number +release = version_number +html_title = f"ROCm CMake Build Tools {version}" +project = "ROCm CMake Build Tools" +author = "Advanced Micro Devices, Inc." +copyright = ( + "Copyright (c) 2024 Advanced Micro Devices, Inc. All rights reserved." +) diff --git a/doc/src/index.rst b/docs/src/index.rst similarity index 70% rename from doc/src/index.rst rename to docs/src/index.rst index 741bc9cc..7bf69845 100755 --- a/doc/src/index.rst +++ b/docs/src/index.rst @@ -2,10 +2,38 @@ sphinx-quickstart on Thu Sep 16 18:46:06 2021. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. +.. highlight:: cmake +ROCm CMake Build Tools +====================== -rocm-cmake -========== +Summary +------- + +ROCm CMake Build Tools (also stylized as "ROCmCMakeBuildTools" and previously +known as "rocm-cmake") is a collection of functions that unify and simplify the +CMake code of the ROCm components, as well as ensuring consistency across these +components. + +Usage +----- + +The ROCm CMake Build Tools are primarily used at build time of a library, and +as such are not runtime dependencies for any generated libraries, packages, +or executables. + +The tools can be included into a CMake project by running:: + + find_package(ROCmCMakeBuildTools) + # or + find_package(ROCM) # deprecated, but included for backwards compatibility + +Once the tools have been included in this manner, individual files may be +included by running ``include()``. The file names, and the +functions, variables, and macros accessible using each file are listed below. + +Files & Contents +~~~~~~~~~~~~~~~~ - :any:`ROCMAnalyzers` + :any:`rocm_mark_as_analyzer` diff --git a/docs/src/license.rst b/docs/src/license.rst new file mode 100644 index 00000000..e13867ae --- /dev/null +++ b/docs/src/license.rst @@ -0,0 +1,4 @@ +License +======= + +.. include:: ../../LICENSE diff --git a/doc/src/ROCMAnalyzers.rst b/docs/src/reference/ROCMAnalyzers.rst similarity index 98% rename from doc/src/ROCMAnalyzers.rst rename to docs/src/reference/ROCMAnalyzers.rst index 24240bda..1a91471d 100755 --- a/doc/src/ROCMAnalyzers.rst +++ b/docs/src/reference/ROCMAnalyzers.rst @@ -20,5 +20,3 @@ Variables .. cmake:variable:: ROCM_ENABLE_GH_ANNOTATIONS Set this variable to ``ON`` so that analyzers will emit diagnostics in a format that github can use to annotate pull requests. - - diff --git a/doc/src/ROCMCheckTargetIds.rst b/docs/src/reference/ROCMCheckTargetIds.rst similarity index 100% rename from doc/src/ROCMCheckTargetIds.rst rename to docs/src/reference/ROCMCheckTargetIds.rst diff --git a/doc/src/ROCMClangTidy.rst b/docs/src/reference/ROCMClangTidy.rst similarity index 100% rename from doc/src/ROCMClangTidy.rst rename to docs/src/reference/ROCMClangTidy.rst diff --git a/doc/src/ROCMClients.rst b/docs/src/reference/ROCMClients.rst similarity index 89% rename from doc/src/ROCMClients.rst rename to docs/src/reference/ROCMClients.rst index f772f8b4..9384e8d1 100644 --- a/doc/src/ROCMClients.rst +++ b/docs/src/reference/ROCMClients.rst @@ -4,7 +4,7 @@ ROCMClients Commands -------- -.. cmake::command:: rocm_package_setup_client_component +.. cmake:command:: rocm_package_setup_client_component .. code-block:: cmake @@ -21,4 +21,3 @@ Commands ) Setup a client component for packaging. See ``rocm_package_setup_component``. - diff --git a/doc/src/ROCMCppCheck.rst b/docs/src/reference/ROCMCppCheck.rst similarity index 100% rename from doc/src/ROCMCppCheck.rst rename to docs/src/reference/ROCMCppCheck.rst diff --git a/doc/src/ROCMCreatePackage.rst b/docs/src/reference/ROCMCreatePackage.rst similarity index 100% rename from doc/src/ROCMCreatePackage.rst rename to docs/src/reference/ROCMCreatePackage.rst diff --git a/doc/src/ROCMDocs.rst b/docs/src/reference/ROCMDocs.rst similarity index 100% rename from doc/src/ROCMDocs.rst rename to docs/src/reference/ROCMDocs.rst diff --git a/doc/src/ROCMDoxygenDoc.rst b/docs/src/reference/ROCMDoxygenDoc.rst similarity index 100% rename from doc/src/ROCMDoxygenDoc.rst rename to docs/src/reference/ROCMDoxygenDoc.rst diff --git a/doc/src/ROCMHeaderWrapper.rst b/docs/src/reference/ROCMHeaderWrapper.rst similarity index 94% rename from doc/src/ROCMHeaderWrapper.rst rename to docs/src/reference/ROCMHeaderWrapper.rst index ba0f96c1..665f0b9a 100644 --- a/doc/src/ROCMHeaderWrapper.rst +++ b/docs/src/reference/ROCMHeaderWrapper.rst @@ -4,7 +4,7 @@ ROCMHeaderWrapper Commands -------- -.. cmake::command:: rocm_wrap_header_file +.. cmake:command:: rocm_wrap_header_file .. code-block:: cmake @@ -39,9 +39,9 @@ Guards A guard item consists of the guard string ````, a wrapper location ````, and an output location ````. You may specify any number of guard strings, wrapper locations and output locations. Guard items will be created from the arguments, and if necessary the following defaults will be used: - - Default ````: ``WRAPPER`` - - Default ````: ``${CMAKE_PROJECT_NAME}/include`` - - Default ````: The associated ```` +* Default ````: ``WRAPPER`` +* Default ````: ``${CMAKE_PROJECT_NAME}/include`` +* Default ````: The associated ```` If no guard items are specified, one will be created using all of the default values. Each guard item will create a wrapper file at ``${PROJECT_BINARY_DIR}//`` for each header file. This wrapper file will have the include guard ``ROCM__``, where ```` is ```` with each ``/`` and ``.`` replaced with ``_``. @@ -78,7 +78,7 @@ If the name of the wrapper file being generated is the same as the name of any ` but it does allow projects which search for specific strings inside a header file to function correctly. -.. cmake::command:: rocm_wrap_header_dir +.. cmake:command:: rocm_wrap_header_dir .. code-block:: cmake diff --git a/doc/src/ROCMInstallSymlinks.rst b/docs/src/reference/ROCMInstallSymlinks.rst similarity index 100% rename from doc/src/ROCMInstallSymlinks.rst rename to docs/src/reference/ROCMInstallSymlinks.rst diff --git a/doc/src/ROCMInstallTargets.rst b/docs/src/reference/ROCMInstallTargets.rst similarity index 81% rename from doc/src/ROCMInstallTargets.rst rename to docs/src/reference/ROCMInstallTargets.rst index 571a6255..bf296a96 100644 --- a/doc/src/ROCMInstallTargets.rst +++ b/docs/src/reference/ROCMInstallTargets.rst @@ -8,12 +8,12 @@ Commands .. code-block:: cmake - rocm_install(TARGETS ... [...]) - rocm_install({FILES | PROGRAMS} ... [...]) - rocm_install(DIRECTORY ... [...]) - rocm_install(SCRIPT [...]) - rocm_install(CODE [...]) - rocm_install(EXPORT [...]) + rocm_install(TARGETS ... [...]) + rocm_install( ... [...]) + rocm_install(DIRECTORY ... [...]) + rocm_install(SCRIPT [...]) + rocm_install(CODE [...]) + rocm_install(EXPORT [...]) Wraps installers to install to the correct component (devel or runtime) unless COMPONENT is specified. The TARGETS signature wraps ``rocm_install_targets``, all other signatures wrap ``install``. @@ -48,4 +48,3 @@ Install targets into the appropriate directory. Unless COMPONENT is specified, l ) Export the installed targets so they can be consumed with ``find_package``. - diff --git a/doc/src/ROCMPackageConfigHelpers.rst b/docs/src/reference/ROCMPackageConfigHelpers.rst similarity index 100% rename from doc/src/ROCMPackageConfigHelpers.rst rename to docs/src/reference/ROCMPackageConfigHelpers.rst diff --git a/doc/src/ROCMSetupVersion.rst b/docs/src/reference/ROCMSetupVersion.rst similarity index 100% rename from doc/src/ROCMSetupVersion.rst rename to docs/src/reference/ROCMSetupVersion.rst diff --git a/doc/src/ROCMSphinxDoc.rst b/docs/src/reference/ROCMSphinxDoc.rst similarity index 100% rename from doc/src/ROCMSphinxDoc.rst rename to docs/src/reference/ROCMSphinxDoc.rst diff --git a/doc/src/ROCMTest.rst b/docs/src/reference/ROCMTest.rst similarity index 100% rename from doc/src/ROCMTest.rst rename to docs/src/reference/ROCMTest.rst diff --git a/doc/src/ROCMUtilities.rst b/docs/src/reference/ROCMUtilities.rst similarity index 91% rename from doc/src/ROCMUtilities.rst rename to docs/src/reference/ROCMUtilities.rst index 859a987b..ebd8bf33 100644 --- a/doc/src/ROCMUtilities.rst +++ b/docs/src/reference/ROCMUtilities.rst @@ -4,7 +4,7 @@ ROCMUtilities Commands -------- -.. cmake::command:: rocm_join_if_set +.. cmake:command:: rocm_join_if_set .. code-block:: cmake @@ -12,7 +12,7 @@ Commands Join all the ```` arguments together using the ```` string. If ```` names a variable with a set value, join that string at the beginning, also using the ```` string, and always store the result in ````. -.. cmake::command:: rocm_defer +.. cmake:command:: rocm_defer .. code-block:: cmake @@ -20,7 +20,7 @@ Join all the ```` arguments together using the ```` string. If ```` at the end of configure. -.. cmake::command:: rocm_find_program_version +.. cmake:command:: rocm_find_program_version .. code-block:: cmake @@ -39,4 +39,3 @@ Determine the presence and installed version of a program that accepts the ``--v Optionally check the version using any of the comparison operators (each comparison operator may only be specified once). If ``out-var`` is not specified, it defaults to ``_VERSION``. If the program is found, ```` is set to the version detected. If that version satisfies all version constraints, the variable ``_OK`` is set to ``TRUE``, otherwise it is set to ``FALSE``. - diff --git a/test/docsphinx/docs/.sphinx/requirements.in b/test/docsphinx/docs/.sphinx/requirements.in index c6a88564..fd6c230b 100644 --- a/test/docsphinx/docs/.sphinx/requirements.in +++ b/test/docsphinx/docs/.sphinx/requirements.in @@ -1 +1,2 @@ -rocm-docs-core==0.20.0 +sphinxcontrib-moderncmakedomain==3.19 +rocm-docs-core==0.38.1 diff --git a/test/docsphinx/docs/.sphinx/requirements.txt b/test/docsphinx/docs/.sphinx/requirements.txt index 5e81171a..5c1e78b8 100644 --- a/test/docsphinx/docs/.sphinx/requirements.txt +++ b/test/docsphinx/docs/.sphinx/requirements.txt @@ -1,8 +1,8 @@ # -# This file is autogenerated by pip-compile with Python 3.10 +# This file is autogenerated by pip-compile with Python 3.8 # by the following command: # -# pip-compile docs/.sphinx/requirements.in +# pip-compile --resolver=backtracking requirements.in # accessible-pygments==0.0.4 # via pydata-sphinx-theme @@ -46,6 +46,10 @@ idna==3.4 # via requests imagesize==1.4.1 # via sphinx +importlib-metadata==7.1.0 + # via sphinx +importlib-resources==6.4.0 + # via rocm-docs-core jinja2==3.1.2 # via # myst-parser @@ -80,9 +84,13 @@ pygments==2.16.1 # pydata-sphinx-theme # sphinx pyjwt[crypto]==2.8.0 - # via pygithub + # via + # pygithub + # pyjwt pynacl==1.5.0 # via pygithub +pytz==2024.1 + # via babel pyyaml==6.0.1 # via # myst-parser @@ -92,8 +100,8 @@ requests==2.31.0 # via # pygithub # sphinx -rocm-docs-core==0.20.0 - # via -r docs/.sphinx/requirements.in +rocm-docs-core==0.38.1 + # via -r requirements.in smmap==5.0.0 # via gitdb snowballstemmer==2.2.0 @@ -111,11 +119,6 @@ sphinx==5.3.0 # sphinx-design # sphinx-external-toc # sphinx-notfound-page - # sphinxcontrib-applehelp - # sphinxcontrib-devhelp - # sphinxcontrib-htmlhelp - # sphinxcontrib-qthelp - # sphinxcontrib-serializinghtml sphinx-book-theme==1.0.1 # via rocm-docs-core sphinx-copybutton==0.5.2 @@ -126,17 +129,19 @@ sphinx-external-toc==0.3.1 # via rocm-docs-core sphinx-notfound-page==0.8.3 # via rocm-docs-core -sphinxcontrib-applehelp==1.0.7 +sphinxcontrib-applehelp==1.0.4 # via sphinx -sphinxcontrib-devhelp==1.0.5 +sphinxcontrib-devhelp==1.0.2 # via sphinx -sphinxcontrib-htmlhelp==2.0.4 +sphinxcontrib-htmlhelp==2.0.1 # via sphinx sphinxcontrib-jsmath==1.0.1 # via sphinx -sphinxcontrib-qthelp==1.0.6 +sphinxcontrib-moderncmakedomain==3.19 + # via -r requirements.in +sphinxcontrib-qthelp==1.0.3 # via sphinx -sphinxcontrib-serializinghtml==1.1.8 +sphinxcontrib-serializinghtml==1.1.5 # via sphinx typing-extensions==4.7.1 # via pydata-sphinx-theme @@ -144,3 +149,7 @@ urllib3==2.0.4 # via requests wrapt==1.15.0 # via deprecated +zipp==3.18.1 + # via + # importlib-metadata + # importlib-resources diff --git a/test/pass/doc-sphinxdoxygen.cmake b/test/pass/doc-sphinxdoxygen.cmake index db88fa81..1ce417e0 100644 --- a/test/pass/doc-sphinxdoxygen.cmake +++ b/test/pass/doc-sphinxdoxygen.cmake @@ -2,7 +2,9 @@ # Copyright (C) 2023 Advanced Micro Devices, Inc. # ###################################################################################################################### -install_dir(${TEST_DIR}/docsphinx TARGETS doc install) -test_expect_installed_file( - share/doc/useful/html/index.html - share/doc/useful/html/reference.html) +if(NOT APPLE) + install_dir(${TEST_DIR}/docsphinx TARGETS doc install) + test_expect_installed_file( + share/doc/useful/html/index.html + share/doc/useful/html/reference.html) +endif()