Skip to content

Commit

Permalink
build: remove old and unused BUNDLE V1 build mode
Browse files Browse the repository at this point in the history
  • Loading branch information
spalicki committed Jan 16, 2025
1 parent 6bc11a0 commit 906e181
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 22 deletions.
6 changes: 1 addition & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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})
Expand Down
4 changes: 2 additions & 2 deletions cmake/Doxygen.cmake
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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)
Expand Down
9 changes: 4 additions & 5 deletions cmake/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
8 changes: 2 additions & 6 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions examples/CMakeLists.txt.in
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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()

Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)\"
Expand Down

0 comments on commit 906e181

Please sign in to comment.