Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OV JS] Conditional enabling of JS API #22139

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ jobs:
- name: CMake configure, build and install - OpenVINO JS API
if: fromJSON(needs.smart_ci.outputs.affected_components).JS_API
run:
cmake -DENABLE_JS=ON -DCPACK_GENERATOR=NPM -DENABLE_SYSTEM_TBB=OFF -UTBB* -S ${OPENVINO_REPO} -B ${BUILD_DIR}
cmake -DCPACK_GENERATOR=NPM -DENABLE_SYSTEM_TBB=OFF -UTBB* -S ${OPENVINO_REPO} -B ${BUILD_DIR}

cmake --build ${BUILD_DIR} --parallel

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/linux_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ jobs:
if: fromJSON(needs.smart_ci.outputs.affected_components).JS_API
run: |
cmake \
-DENABLE_JS=ON \
-DCPACK_GENERATOR=NPM \
-DENABLE_SYSTEM_TBB=OFF -UTBB* \
-DENABLE_INTEL_GPU=OFF \
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ jobs:
if: fromJSON(needs.smart_ci.outputs.affected_components).JS_API
run: |
cmake \
-DENABLE_JS=ON \
-DCPACK_GENERATOR=NPM \
-S ${{ env.OPENVINO_REPO }} \
-B ${{ env.BUILD_DIR }}
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/mac_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ jobs:
if: fromJSON(needs.smart_ci.outputs.affected_components).JS_API
run: |
cmake \
-DENABLE_JS=ON \
-DCPACK_GENERATOR=NPM \
-S ${{ env.OPENVINO_REPO }} \
-B ${{ env.BUILD_DIR }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ jobs:
if: ${{ 'false' }} # 128689
# if: fromJSON(needs.smart_ci.outputs.affected_components).JS_API
run:
cmake -DENABLE_JS=ON -DCPACK_GENERATOR=NPM -DENABLE_SYSTEM_TBB=OFF -UTBB* -S ${{ env.OPENVINO_REPO }} -B ${{ env.BUILD_DIR }}
cmake -DCPACK_GENERATOR=NPM -DENABLE_SYSTEM_TBB=OFF -UTBB* -S ${{ env.OPENVINO_REPO }} -B ${{ env.BUILD_DIR }}

cmake --build ${{ env.BUILD_DIR }} --parallel

Expand Down
3 changes: 3 additions & 0 deletions cmake/features.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ ov_dependent_option (ENABLE_SYSTEM_SNAPPY "Enables use of system version of Snap
ov_dependent_option (ENABLE_PYTHON_PACKAGING "Enables packaging of Python API in APT / YUM" OFF
"ENABLE_PYTHON;UNIX" OFF)

ov_dependent_option (ENABLE_JS "Enables JS API building" ON
"NOT WIN32;NOT CMAKE_TOOLCHAIN_FILE MATCHES 'vcpkg';NOT DEFINED VCPKG_VERBOSE" OFF)
ilya-lavrenov marked this conversation as resolved.
Show resolved Hide resolved

ov_option(ENABLE_OPENVINO_DEBUG "Enable output for OPENVINO_DEBUG statements" OFF)

if(NOT BUILD_SHARED_LIBS AND ENABLE_OV_TF_FRONTEND)
Expand Down
3 changes: 1 addition & 2 deletions src/bindings/js/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
# SPDX-License-Identifier: Apache-2.0
#

# Disable JS API by default
if(NOT ENABLE_JS)
message(WARNING "JS API is disabled by default, specify -DENABLE_JS=ON to switch it on")
message("JS API is disabled")
ilya-lavrenov marked this conversation as resolved.
Show resolved Hide resolved
return()
endif()

Expand Down
4 changes: 0 additions & 4 deletions src/bindings/js/node/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
# SPDX-License-Identifier: Apache-2.0
#

if(WIN32)
return()
endif()

if(CMAKE_VERSION VERSION_LESS 3.14)
message(WARNING "JS API is not available with CMake version less than 3.14, skipping")
return()
Expand Down
Loading