diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e23ddf19ca..359d31e6e6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -139,7 +139,7 @@ configure_file( "${PROJECT_BINARY_DIR}/README" ) -if(DNNL_INSTALL_MODE MATCHES "^(BUNDLE|BUNDLE_V2)$" AND NOT DEFINED CMAKE_INSTALL_LIBDIR) +if(DNNL_INSTALL_MODE STREQUAL "BUNDLE" AND NOT DEFINED CMAKE_INSTALL_LIBDIR) # define CMAKE_INSTALL_LIBDIR as "lib" in the case of bundle set(CMAKE_INSTALL_LIBDIR "lib") endif() @@ -152,10 +152,6 @@ add_subdirectory(examples) add_subdirectory(tests) if(DNNL_INSTALL_MODE STREQUAL "BUNDLE") - install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}) - install(FILES THIRD-PARTY-PROGRAMS DESTINATION ${CMAKE_INSTALL_PREFIX}) - install(FILES ${PROJECT_BINARY_DIR}/README DESTINATION ${CMAKE_INSTALL_PREFIX}) -elseif(DNNL_INSTALL_MODE STREQUAL "BUNDLE_V2") install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/doc/${LIB_PACKAGE_NAME}) install(FILES THIRD-PARTY-PROGRAMS DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/doc/${LIB_PACKAGE_NAME}) install(FILES ${PROJECT_BINARY_DIR}/README DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/doc/${LIB_PACKAGE_NAME}) diff --git a/cmake/Doxygen.cmake b/cmake/Doxygen.cmake index 5d27d650a9e..a9409985be8 100644 --- a/cmake/Doxygen.cmake +++ b/cmake/Doxygen.cmake @@ -1,5 +1,5 @@ #=============================================================================== -# Copyright 2016-2024 Intel Corporation +# Copyright 2016-2025 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -49,7 +49,7 @@ if(DOXYGEN_FOUND) COMMENT "Generating API documentation in .xml format with Doxygen" VERBATIM) add_custom_target(doc_doxygen DEPENDS ${DOXYGEN_STAMP_FILE}) - if(NOT DNNL_INSTALL_MODE MATCHES "BUNDLE|BUNDLE_V2") + if(NOT DNNL_INSTALL_MODE STREQUAL "BUNDLE") install( DIRECTORY ${DOXYGEN_OUTPUT_DIR} DESTINATION share/doc/${LIB_PACKAGE_NAME} OPTIONAL) diff --git a/cmake/options.cmake b/cmake/options.cmake index 9dbf8a7fdda..68b579b14ac 100644 --- a/cmake/options.cmake +++ b/cmake/options.cmake @@ -81,12 +81,11 @@ set(DNNL_TEST_SET "CI" CACHE STRING semicolon separated string, e.g., DNNL_TEST_SET=CI;NO_CORR.") set(DNNL_INSTALL_MODE "DEFAULT" CACHE STRING - "specifies installation mode; supports DEFAULT, BUNDLE and BUNDLE_V2. + "specifies installation mode; supports DEFAULT and BUNDLE. - When BUNDLE or BUNDLE_V2 option is set oneDNN will be installed as a bundle - which contains examples and benchdnn. The difference between BUNDLE and - BUNDLE_V2 is in the directory layout.") -if (NOT "${DNNL_INSTALL_MODE}" MATCHES "^(DEFAULT|BUNDLE|BUNDLE_V2)$") + When BUNDLE option is set oneDNN will be installed as a bundle + which contains examples and benchdnn.") +if (NOT "${DNNL_INSTALL_MODE}" MATCHES "^(DEFAULT|BUNDLE)$") message(FATAL_ERROR "Unsupported install mode: ${DNNL_INSTALL_MODE}") endif() diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index fd2e8e34f43..56d6a48787b 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -204,12 +204,8 @@ foreach(src ${sources}) endif() endforeach() -if (DNNL_INSTALL_MODE STREQUAL "BUNDLE" OR DNNL_INSTALL_MODE STREQUAL "BUNDLE_V2") - if(DNNL_INSTALL_MODE STREQUAL "BUNDLE") - set(BUNDLE_EXAMPLES_DIR "examples") - else() - set(BUNDLE_EXAMPLES_DIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${LIB_PACKAGE_NAME}/examples") - endif() +if (DNNL_INSTALL_MODE STREQUAL "BUNDLE") + set(BUNDLE_EXAMPLES_DIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${LIB_PACKAGE_NAME}/examples") configure_file(CMakeLists.txt.in CMakeLists.txt @ONLY) install(FILES diff --git a/examples/CMakeLists.txt.in b/examples/CMakeLists.txt.in index 2a910b418c0..4ac638719fc 100644 --- a/examples/CMakeLists.txt.in +++ b/examples/CMakeLists.txt.in @@ -1,5 +1,5 @@ #=============================================================================== -# Copyright 2019-2024 Intel Corporation +# Copyright 2019-2025 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ set(DNNL_GPU_RUNTIME "@DNNL_GPU_RUNTIME@") set(DNNL_INSTALL_MODE "@DNNL_INSTALL_MODE@") set(IS_NEW_DIR_LAYOUT FALSE) -if(DNNL_INSTALL_MODE STREQUAL "BUNDLE_V2") +if(DNNL_INSTALL_MODE STREQUAL "BUNDLE") set(IS_NEW_DIR_LAYOUT TRUE) endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e2f29bc3b4d..217b7af172f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -231,7 +231,7 @@ foreach(header ${HEADERS_SUBDIR}) endforeach() string(TOUPPER "${LIB_PACKAGE_NAME}::" LIB_NAMESPACE) -if(DNNL_INSTALL_MODE STREQUAL "BUNDLE_V2" AND WIN32) +if(DNNL_INSTALL_MODE STREQUAL "BUNDLE" AND WIN32) # Config file for binary distribution needs to define a mapping # DEBUG -> RELWITHMDD so that proper library (dnnld) is picked up for the # DEBUG configuration. @@ -262,7 +262,7 @@ install(EXPORT ${LIB_EXPORT_NAME} # Apply a workaround to CMake config file to make it work with symlinks. # The patched config file is only used in oneAPI binary distribution. -if(UNIX AND DNNL_INSTALL_MODE STREQUAL "BUNDLE_V2") +if(UNIX AND DNNL_INSTALL_MODE STREQUAL "BUNDLE") install(CODE "file(READ \"${CMAKE_INSTALL_PREFIX}/${LIB_CONFIG_INSTALL_DIR}/${LIB_PACKAGE_NAME}-targets.cmake\" TARGETS_CONTENT)") install(CODE "string(REPLACE \"get_filename_component(_IMPORT_PREFIX \\\"\\\${CMAKE_CURRENT_LIST_FILE}\\\" PATH)\"