Skip to content

Commit

Permalink
build: new option to define test scope
Browse files Browse the repository at this point in the history
  • Loading branch information
dzarukin committed May 29, 2020
1 parent eea7746 commit ad1b9e9
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion cmake/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,27 @@ set(DNNL_LIBRARY_TYPE "SHARED" CACHE STRING
"specifies whether oneDNN library should be SHARED or STATIC")
option(DNNL_BUILD_EXAMPLES "builds examples" ON)
option(DNNL_BUILD_TESTS "builds tests" ON)
option(DNNL_BUILD_FOR_CI "specifies whether oneDNN library should be built for CI" OFF)
option(DNNL_BUILD_FOR_CI
"specifies whether oneDNN library will use special testing environment for
internal testing processes"
OFF)
option(DNNL_WERROR "treat warnings as errors" OFF)

set(DNNL_TEST_SET "CI" CACHE STRING
"specifies testing targets coverage. Supports CI, NIGHTLY.
When CI option is set, it enables a subset of test targets to run. When
NIGHTLY option is set, it enables a broader set of test targets to run.")
# Transfer string literal into a number to support nested inclusions easier
set(DNNL_TEST_SET_CI "1")
set(DNNL_TEST_SET_NIGHTLY "2")

if(DNNL_TEST_SET STREQUAL "NIGHTLY")
set(DNNL_TEST_SET ${DNNL_TEST_SET_NIGHTLY})
else()
set(DNNL_TEST_SET ${DNNL_TEST_SET_CI})
endif()

set(DNNL_INSTALL_MODE "DEFAULT" CACHE STRING
"specifies installation mode; supports DEFAULT or BUNDLE.
Expand Down

0 comments on commit ad1b9e9

Please sign in to comment.