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

setup for windows debug build #133

Open
rolarsen opened this issue Mar 26, 2020 · 2 comments
Open

setup for windows debug build #133

rolarsen opened this issue Mar 26, 2020 · 2 comments

Comments

@rolarsen
Copy link
Contributor

target_link_libraries(InferenceEngineOpenVINO FAST inference_engine.lib)

if(WIN32)
    target_link_libraries(InferenceEngineOpenVINO FAST optimized inference_engine.lib debug inference_engined.lib)
else()
   target_link_libraries(InferenceEngineOpenVINO FAST libinference_engine.so)
endif()

In addition the cmake/ExternalOpenVINO.cmake must be changed locally to build and install Debug version of OpenVINO. Found no way so far to setup cmake for automatic for this....

    BUILD_COMMAND
        ${CMAKE_COMMAND} --build . --config Debug --target inference_engine COMMAND
        ${CMAKE_COMMAND} --build . --config Debug --target clDNNPlugin COMMAND
        ${CMAKE_COMMAND} --build . --config Debug --target myriadPlugin COMMAND
        ${CMAKE_COMMAND} --build . --config Debug --target MKLDNNPlugin
    INSTALL_COMMAND
        ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Debug/inference_engined.lib ${FAST_EXTERNAL_INSTALL_DIR}/lib/ COMMAND
        ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Debug/inference_engined.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
        ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Debug/clDNNPlugind.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
        ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Debug/MKLDNNPlugind.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
        ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Debug/myriadPlugind.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
        ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Debug/ngraphd.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
        ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Debug/plugins.xml ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
        ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/inference-engine/temp/tbb/bin/tbb.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
        ${CMAKE_COMMAND} -E copy_directory ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/inference-engine/include/ ${FAST_EXTERNAL_INSTALL_DIR}/include/openvino/
    )
@rolarsen
Copy link
Contributor Author

need CMAKE_BUILD_TYPE as well

    CMAKE_CACHE_ARGS
        -DCMAKE_BUILD_TYPE:STRING=Debug
        -DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF
        -DCMAKE_INSTALL_MESSAGE:BOOL=LAZY
        -DCMAKE_INSTALL_PREFIX:STRING=${FAST_EXTERNAL_INSTALL_DIR}
    BUILD_COMMAND
        ${CMAKE_COMMAND} --build . --config Debug --target inference_engine COMMAND
        ${CMAKE_COMMAND} --build . --config Debug --target clDNNPlugin COMMAND
        ${CMAKE_COMMAND} --build . --config Debug --target myriadPlugin COMMAND
        ${CMAKE_COMMAND} --build . --config Debug --target MKLDNNPlugin
    INSTALL_COMMAND
        ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Debug/inference_engined.lib ${FAST_EXTERNAL_INSTALL_DIR}/lib/ COMMAND
        ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Debug/inference_engined.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
        ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Debug/clDNNPlugind.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
        ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Debug/MKLDNNPlugind.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
        ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Debug/myriadPlugind.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
        ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Debug/ngraphd.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
        ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/bin/intel64/Debug/plugins.xml ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
        ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/inference-engine/temp/tbb/bin/tbb.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/ COMMAND
        ${CMAKE_COMMAND} -E copy_directory ${FAST_EXTERNAL_BUILD_DIR}/OpenVINO/src/OpenVINO/inference-engine/include/ ${FAST_EXTERNAL_INSTALL_DIR}/include/openvino/
    )

@rolarsen
Copy link
Contributor Author

This version of ExternalOpenVINO.cmake makes it easy to build fast for debug on windows,
just patch line 8 - Release to Debug

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()

So far not found how to transfer CMAKE_BUILD_TYPE from Visual Studio to CMake.....

ExternalOpenVINO.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants