Coder Social home page Coder Social logo

Comments (2)

sl1pkn07 avatar sl1pkn07 commented on August 16, 2024

seems not generate the file mocks\Mockcl.c and mocks/Mockcl.h when use more than one thread

-- Build files have been written to: /tmp/makepkg/opencl-headers-git/src/build-ocl-hpp
[  0%] Generating test runner
[  0%] Generating test runner
[  0%] Stripping defines from cl.h
[  0%] Stripping defines from cl.h
[  1%] Generating mocks
[  1%] Generating mocks
Creating mock for cl...
Creating mock for cl...
/usr/lib/ruby/3.0.0/fileutils.rb:1414:in `initialize': No such file or directory @ rb_sysopen - mocks/Mockcl.h.new (Errno::ENOENT)
        from /usr/lib/ruby/3.0.0/fileutils.rb:1414:in `open'
        from /usr/lib/ruby/3.0.0/fileutils.rb:1414:in `copy_file'
        from /usr/lib/ruby/3.0.0/fileutils.rb:514:in `copy_file'
        from /usr/lib/ruby/3.0.0/fileutils.rb:433:in `block in cp'
        from /usr/lib/ruby/3.0.0/fileutils.rb:1597:in `block in fu_each_src_dest'
        from /usr/lib/ruby/3.0.0/fileutils.rb:1613:in `fu_each_src_dest0'
        from /usr/lib/ruby/3.0.0/fileutils.rb:1595:in `fu_each_src_dest'
        from /usr/lib/ruby/3.0.0/fileutils.rb:432:in `cp'
        from /tmp/makepkg/opencl-headers-git/src/OpenCL-CLHPP/external/CMock/lib/cmock_file_writer.rb:41:in `update_file'
        from /tmp/makepkg/opencl-headers-git/src/OpenCL-CLHPP/external/CMock/lib/cmock_file_writer.rb:33:in `create_file'
        from /tmp/makepkg/opencl-headers-git/src/OpenCL-CLHPP/external/CMock/lib/cmock_generator.rb:66:in `create_mock_header_file'
        from /tmp/makepkg/opencl-headers-git/src/OpenCL-CLHPP/external/CMock/lib/cmock_generator.rb:53:in `create_mock'
        from /tmp/makepkg/opencl-headers-git/src/OpenCL-CLHPP/external/CMock/lib/cmock.rb:40:in `generate_mock'
        from /tmp/makepkg/opencl-headers-git/src/OpenCL-CLHPP/external/CMock/lib/cmock.rb:31:in `block in setup_mocks'
        from /tmp/makepkg/opencl-headers-git/src/OpenCL-CLHPP/external/CMock/lib/cmock.rb:30:in `each'
        from /tmp/makepkg/opencl-headers-git/src/OpenCL-CLHPP/external/CMock/lib/cmock.rb:30:in `setup_mocks'
        from /tmp/makepkg/opencl-headers-git/src/OpenCL-CLHPP/external/CMock/lib/cmock.rb:85:in `<main>'
make[2]: *** [tests/CMakeFiles/test_openclhpp_300_CL_HPP_USE_CL_SUB_GROUPS_KHR.dir/build.make:80: tests/mocks/Mockcl.c] Error 1
make[1]: *** [CMakeFiles/Makefile2:237: tests/CMakeFiles/test_openclhpp_300_CL_HPP_USE_CL_SUB_GROUPS_KHR.dir/all] Error 2
make[1]: *** Se espera a que terminen otras tareas....
[  1%] Building C object tests/CMakeFiles/test_openclhpp_300_CL_HPP_CL_1_2_DEFAULT_BUILD.dir/test_openclhpp_Runner.c.o
[  1%] Building CXX object tests/CMakeFiles/test_openclhpp_300_CL_HPP_CL_1_2_DEFAULT_BUILD.dir/test_openclhpp.cpp.o
/tmp/makepkg/opencl-headers-git/src/OpenCL-CLHPP/tests/test_openclhpp.cpp:14:10: error fatal: Mockcl.h: No existe el fichero o el directorio
   14 | #include "Mockcl.h"
      |          ^~~~~~~~~~
compilación terminada.
make[2]: *** [tests/CMakeFiles/test_openclhpp_300_CL_HPP_CL_1_2_DEFAULT_BUILD.dir/build.make:110: tests/CMakeFiles/test_openclhpp_300_CL_HPP_CL_1_2_DEFAULT_BUILD.dir/test_openclhpp.cpp.o] Error 1
make[2]: *** Se espera a que terminen otras tareas....
/tmp/makepkg/opencl-headers-git/src/build-ocl-hpp/tests/test_openclhpp_Runner.c:37:10: error fatal: Mockcl.h: No existe el fichero o el directorio
   37 | #include "Mockcl.h"
      |          ^~~~~~~~~~
compilación terminada.
make[2]: *** [tests/CMakeFiles/test_openclhpp_300_CL_HPP_CL_1_2_DEFAULT_BUILD.dir/build.make:96: tests/CMakeFiles/test_openclhpp_300_CL_HPP_CL_1_2_DEFAULT_BUILD.dir/test_openclhpp_Runner.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:264: tests/CMakeFiles/test_openclhpp_300_CL_HPP_CL_1_2_DEFAULT_BUILD.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

sorry, output in spanish

from opencl-clhpp.

sl1pkn07 avatar sl1pkn07 commented on August 16, 2024

ive try with this

execute_process(
    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
    COMMAND ${CMAKE_COMMAND} -E make_directory stripped
    COMMAND ${CMAKE_COMMAND} -E make_directory mocks
)
execute_process(
    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
    COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/strip_defines.py ${OPENCL_INCLUDE_DIR}/CL/cl.h stripped/cl.h
)
message(STATUS "Stripping defines from cl.h")
execute_process(
    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
    COMMAND ruby ${CMOCK_DIR}/lib/cmock.rb -o${CMAKE_CURRENT_SOURCE_DIR}/cmock.yml stripped/cl.h
    )
message(STATUS "Generating mocks")

execute_process(
    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
    COMMAND ruby ${UNITY_DIR}/auto/generate_test_runner.rb ${CMAKE_CURRENT_SOURCE_DIR}/test_openclhpp.cpp ${CMAKE_CURRENT_SOURCE_DIR}/cmock.yml test_openclhpp_Runner.c
)
message(STATUS "Generating test runner")

works ok in parallell (test with j40) if generate the mocks in "configure"time instead of build time like now

from opencl-clhpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.