Skip to content

Commit

Permalink
Merge branch 'develop' into feature/gemv_rps_test
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-kelley authored Oct 1, 2021
2 parents 06f0ddb + 1274344 commit 4bb27c5
Show file tree
Hide file tree
Showing 293 changed files with 7,885 additions and 555 deletions.
3 changes: 3 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ endif()
* KokkosKernels_ENABLE_TESTS: BOOL
* Whether to build tests.
* Default: OFF
* KokkosKernels_ENABLE_DOCS: BOOL
* Whether to build docs.
* Default: OFF
* KokkosKernels_ENABLE_TPL_BLAS: BOOL
* Whether to enable BLAS
* Default: OFF
Expand Down
46 changes: 29 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,31 +54,40 @@ IF (NOT KOKKOSKERNELS_HAS_TRILINOS)
KOKKOSKERNELS_ADD_OPTION(
"ENABLE_EXAMPLES"
OFF
BOOL
"Whether to build examples. Default: OFF"
BOOL
"Whether to build examples. Default: OFF"
)
KOKKOSKERNELS_ADD_OPTION(
"ENABLE_TESTS"
OFF
BOOL
"Whether to build tests. Default: OFF"
"ENABLE_TESTS"
OFF
BOOL
"Whether to build tests. Default: OFF"
)
KOKKOSKERNELS_ADD_OPTION(
"ENABLE_TESTS_AND_PERFSUITE"
OFF
BOOL
"Whether to build tests including Perfsuite. Default: OFF"
)
ENDIF()
IF(KokkosKernels_ENABLE_TESTS_AND_PERFSUITE)
set(BLT_CODE_CHECK_TARGET_NAME "fix-for-blt" CACHE STRING "Docstring")
set(INFRASTRUCTURE_ONLY ON CACHE BOOL "Only build the RAJAPerf infrastructure, no builtin kernels")
add_definitions("-DRAJAPERF_INFRASTRUCTURE_ONLY")
add_subdirectory(tpls/rajaperf)
include_directories(tpls/rajaperf/src)
endif()
ENDIF()
IF(KokkosKernels_ENABLE_TESTS_AND_PERFSUITE)
set(BLT_CODE_CHECK_TARGET_NAME "fix-for-blt" CACHE STRING "Docstring")
set(INFRASTRUCTURE_ONLY ON CACHE BOOL "Only build the RAJAPerf infrastructure, no builtin kernels")
add_definitions("-DRAJAPERF_INFRASTRUCTURE_ONLY")
add_subdirectory(tpls/rajaperf)
include_directories(tpls/rajaperf/src)
ENDIF()
ENDIF ()

KOKKOSKERNELS_ADD_OPTION(
"ENABLE_DOCS"
OFF
BOOL
"Whether to build docs. Default: OFF"
)

SET(KokkosKernels_INSTALL_TESTING OFF CACHE INTERNAL
"Whether to build tests and examples against installation")
"Whether to build tests and examples against installation")
IF (KokkosKernels_INSTALL_TESTING)
# Force testing on if we are doing intall testing
SET(KOKKOSKERNELS_ENABLE_TESTS ON)
Expand Down Expand Up @@ -207,13 +216,16 @@ ELSE()
MESSAGE("")
# Skip building Kokkos Kernels if we are doing an installation test
ADD_SUBDIRECTORY(src)
IF(KokkosKernels_ENABLE_INSTALL_TEST)
IF (KokkosKernels_ENABLE_INSTALL_TEST)
ADD_SUBDIRECTORY(install_test)
MESSAGE("The install test has been enabled, you will need to peform: make install before running the tests otherwise install_test will fail")
ENDIF()
ENDIF ()
KOKKOSKERNELS_ADD_TEST_DIRECTORIES(perf_test)
KOKKOSKERNELS_ADD_TEST_DIRECTORIES(unit_test)
KOKKOSKERNELS_ADD_EXAMPLE_DIRECTORIES(example)

KOKKOSKERNELS_PACKAGE_POSTPROCESS()
IF (KokkosKernels_ENABLE_DOCS)
ADD_SUBDIRECTORY(docs)
ENDIF ()
ENDIF()
11 changes: 11 additions & 0 deletions cmake/Modules/FindSphinx.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#Look for an executable called sphinx-build
find_program(SPHINX_EXECUTABLE
NAMES sphinx-build
DOC "Path to sphinx-build executable")

include(FindPackageHandleStandardArgs)

#Handle standard arguments to find_package like REQUIRED and QUIET
find_package_handle_standard_args(Sphinx
"Failed to find sphinx-build executable"
SPHINX_EXECUTABLE)
45 changes: 45 additions & 0 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Source: https://devblogs.microsoft.com/cppblog/clear-functional-c-documentation-with-sphinx-breathe-doxygen-cmake/
# Author: Evan Harvey <[email protected]>
find_package(Doxygen REQUIRED)
find_package(Sphinx REQUIRED)

set(SPHINX_SOURCE ${CMAKE_CURRENT_SOURCE_DIR})
set(SPHINX_BUILD ${CMAKE_CURRENT_BINARY_DIR}/docs/sphinx)
set(KOKKOS_INCLUDE_DIR ${Kokkos_DIR}/../../../include)

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/conf.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/index.rst DESTINATION ${CMAKE_CURRENT_BINARY_DIR})

# Find all public headers in KokkosKernels and Kokkos::kokkos
file(GLOB_RECURSE ${PROJECT_NAME}_PUBLIC_HEADERS ${PROJECT_SOURCE_DIR}/src/*.hpp ${KOKKOS_INCLUDE_DIR}/*.hpp)

set(DOXYGEN_KOKKOSKERNELS_INPUT_DIR ${PROJECT_SOURCE_DIR}/src)
set(DOXYGEN_KOKKOS_INPUT_DIR ${KOKKOS_INCLUDE_DIR})
set(DOXYGEN_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/doxygen/)
set(DOXYGEN_INDEX_FILE ${DOXYGEN_OUTPUT_DIR}/xml/index.xml)
set(DOXYFILE_IN ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in)
set(DOXYFILE_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)

#Replace variables inside @@ with the current values
configure_file(${DOXYFILE_IN} ${DOXYFILE_OUT})

file(MAKE_DIRECTORY ${DOXYGEN_OUTPUT_DIR}) #Doxygen won't create this for us

add_custom_command(OUTPUT ${DOXYGEN_INDEX_FILE}
DEPENDS ${${PROJECT_NAME}_PUBLIC_HEADERS}
COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS Doxyfile
COMMENT "Generating docs")

add_custom_target(Doxygen ALL DEPENDS ${DOXYGEN_INDEX_FILE})


add_custom_target(Sphinx ALL
COMMAND ${SPHINX_EXECUTABLE} -b html
# Tell Breathe where to find the Doxygen output
-Dbreathe_projects.${PROJECT_NAME}=${DOXYGEN_OUTPUT_DIR}/xml
${SPHINX_SOURCE} ${SPHINX_BUILD}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS Doxygen
COMMENT "Generating documentation with Sphinx")
Loading

0 comments on commit 4bb27c5

Please sign in to comment.