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

Fix building MKLDNNPlugin when the source path contains spaces #5109

Merged
merged 1 commit into from
Apr 12, 2021
Merged

Fix building MKLDNNPlugin when the source path contains spaces #5109

merged 1 commit into from
Apr 12, 2021

Conversation

IRDonch
Copy link

@IRDonch IRDonch commented Apr 5, 2021

The key changes are:

  • Using VERBATIM to ensure CMake property passes command-line arguments to child processes.

  • Using the INCLUDE_DIRECTORIES property instead of COMPILE_FLAGS to add include directories, because COMPILE_FLAGS are treated as space-separated values. (A small side benefit is that this doesn't rely on -I being the include directory option.)

In addition, some changes had to be made in order to preserve behavior:

  • The _GEN_ARGS_LIST variable has to be inlined, because ARCH_SET is a list, and therefore the -DXARCH_SET=... argument gets split into multiple arguments (this happens to work by coincidence without VERBATIM). IMO, the code looks better this way anyway.

  • It's no longer necessary to replace spaces in XARCH_SET in cross_compiled_disp_gen.cmake, because those spaces were an artifact of how the CMake arguments were passed before.

@IRDonch IRDonch requested a review from a team April 5, 2021 14:47
@openvino-pushbot openvino-pushbot added the category: inference OpenVINO Runtime library - Inference label Apr 5, 2021
@IRDonch IRDonch marked this pull request as draft April 6, 2021 17:40
The key changes are:

* Using VERBATIM to ensure CMake property passes command-line arguments
  to child processes.

* Using the INCLUDE_DIRECTORIES property instead of COMPILE_FLAGS to add
  include directories, because COMPILE_FLAGS are treated as space-separated
  values. (A small side benefit is that this doesn't rely on -I being
  the include directory option.)

In addition, some changes had to be made in order to preserve behavior:

* The _GEN_ARGS_LIST variable has to be inlined, because ARCH_SET is a list,
  and therefore the "-DXARCH_SET=..." argument gets split into multiple arguments
  (this happens to work by coincidence without VERBATIM). IMO, the code looks
  better this way anyway.

* It's no longer necessary to replace spaces in XARCH_SET in
  cross_compiled_disp_gen.cmake, because those spaces were an artifact of how
  the CMake arguments were passed before.
@IRDonch IRDonch marked this pull request as ready for review April 7, 2021 14:53
@ilya-lavrenov ilya-lavrenov merged commit b92d1c1 into openvinotoolkit:master Apr 12, 2021
@ilya-lavrenov ilya-lavrenov added this to the 2021.4 milestone Apr 12, 2021
@ilya-lavrenov ilya-lavrenov self-assigned this Apr 12, 2021
@IRDonch IRDonch deleted the handle-spaces branch April 12, 2021 12:48
mryzhov pushed a commit to mryzhov/openvino that referenced this pull request Apr 23, 2021
…inotoolkit#5109)

The key changes are:

* Using VERBATIM to ensure CMake property passes command-line arguments
  to child processes.

* Using the INCLUDE_DIRECTORIES property instead of COMPILE_FLAGS to add
  include directories, because COMPILE_FLAGS are treated as space-separated
  values. (A small side benefit is that this doesn't rely on -I being
  the include directory option.)

In addition, some changes had to be made in order to preserve behavior:

* The _GEN_ARGS_LIST variable has to be inlined, because ARCH_SET is a list,
  and therefore the "-DXARCH_SET=..." argument gets split into multiple arguments
  (this happens to work by coincidence without VERBATIM). IMO, the code looks
  better this way anyway.

* It's no longer necessary to replace spaces in XARCH_SET in
  cross_compiled_disp_gen.cmake, because those spaces were an artifact of how
  the CMake arguments were passed before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: inference OpenVINO Runtime library - Inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants