ddemidov / vexcl

VexCL is a C++ vector expression template library for OpenCL/CUDA/OpenMP
http://vexcl.readthedocs.org
MIT License
699 stars 81 forks source link

cmake failure #272

Closed zsw667291 closed 4 years ago

zsw667291 commented 4 years ago

when I use cmake command it comes error

cmake -DVEXCL_TEST_COVERAGE=ON -DVEXCL_BUILD_TESTS=ON -DVEXCL_BUILD_EXAMPLES=ON -DVEXCL_BACKEND=${VEXCL_BACKEND} -DVEXCL_JIT_COMPILER_FLAGS=${VEXCL_JIT_COMPILER_FLAGS} ..
-- No build type selected, default to RelWithDebInfo
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found Boost: /usr/include (found version "1.58.0") found components:  chrono date_time filesystem program_options system thread unit_test_framework atomic 
-- Looking for CL_VERSION_2_2
-- Looking for CL_VERSION_2_2 - not found
-- Looking for CL_VERSION_2_1
-- Looking for CL_VERSION_2_1 - found
-- Found OpenCL: /usr/lib/x86_64-linux-gnu/libOpenCL.so (found version "2.1") 
-- Found VexCL::OpenCL
-- Found CUDA: /usr/local/cuda (found version "9.0") 
-- Found VexCL::CUDA
CMake Warning (dev) at tests/CMakeLists.txt:5 (target_link_libraries):
  Policy CMP0079 is not set: target_link_libraries allows use with targets in
  other directories.  Run "cmake --help-policy CMP0079" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  Target

    Common

  is not created in this directory.  For compatibility with older versions of
  CMake, link library

    --coverage

  will be looked up in the directory in which the target was created rather
  than in this calling directory.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "fft" links to target "VexCL::Backend" but the target was not found.
  Perhaps a find_package() call is missing for an IMPORTED target, or an
  ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:141 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "context" links to target "VexCL::Backend" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:113 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "reinterpret" links to target "VexCL::Backend" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:108 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "tagged_terminal" links to target "VexCL::Backend" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:83 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "vector_view" links to target "VexCL::Backend" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:80 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "vector_pointer" links to target "VexCL::Backend" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:82 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "stencil" links to target "VexCL::Backend" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:91 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "temporary" links to target "VexCL::Backend" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:84 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "tensordot" links to target "VexCL::Backend" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:81 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "sparse_matrices" links to target "VexCL::Backend" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:90 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "threads" links to target "VexCL::Backend" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:100 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "multiple_objects" links to target "VexCL::Backend" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:109 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "generator" links to target "VexCL::Backend" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:92 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "svm" links to target "VexCL::Backend" but the target was not found.
  Perhaps a find_package() call is missing for an IMPORTED target, or an
  ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:101 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "scan_by_key" links to target "VexCL::Backend" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:97 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "logical" links to target "VexCL::Backend" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:99 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "multivector_arithmetics" links to target "VexCL::Backend" but the
  target was not found.  Perhaps a find_package() call is missing for an
  IMPORTED target, or an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:87 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "boost_version" links to target "VexCL::Backend" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:74 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "custom_kernel" links to target "VexCL::Backend" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:104 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "cast" links to target "VexCL::Backend" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:85 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "multivector_create" links to target "VexCL::Backend" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:86 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "reduce_by_key" links to target "VexCL::Backend" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:98 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "vector_arithmetics" links to target "VexCL::Backend" but the target
  was not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:79 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "events" links to target "VexCL::Backend" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:102 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "types" links to target "VexCL::Backend" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:75 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "vector_copy" links to target "VexCL::Backend" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:78 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "deduce" links to target "VexCL::Backend" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:76 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "random" links to target "VexCL::Backend" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:94 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "vector_create" links to target "VexCL::Backend" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:77 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "multi_array" links to target "VexCL::Backend" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:88 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "image" links to target "VexCL::Backend" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:103 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "spmv" links to target "VexCL::Backend" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:89 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "scan" links to target "VexCL::Backend" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:96 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "vector_io" links to target "VexCL::Backend" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:107 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "mba" links to target "VexCL::Backend" but the target was not found.
  Perhaps a find_package() call is missing for an IMPORTED target, or an
  ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:93 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "sort" links to target "VexCL::Backend" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:95 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "eval" links to target "VexCL::Backend" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:105 (add_vexcl_test)

CMake Error at tests/CMakeLists.txt:31 (add_executable):
  Target "constants" links to target "VexCL::Backend" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  tests/CMakeLists.txt:67 (_add_vexcl_test)
  tests/CMakeLists.txt:106 (add_vexcl_test)

CMake Error at examples/CMakeLists.txt:9 (add_executable):
  Target "fft_benchmark" links to target "VexCL::Backend" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  examples/CMakeLists.txt:66 (add_vexcl_examples)

CMake Error at examples/CMakeLists.txt:9 (add_executable):
  Target "fft_profile" links to target "VexCL::Backend" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  examples/CMakeLists.txt:22 (add_vexcl_examples)

CMake Error at examples/CMakeLists.txt:9 (add_executable):
  Target "symbolic" links to target "VexCL::Backend" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  examples/CMakeLists.txt:60 (add_vexcl_examples)

CMake Error at examples/CMakeLists.txt:9 (add_executable):
  Target "devlist" links to target "VexCL::Backend" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  examples/CMakeLists.txt:21 (add_vexcl_examples)

CMake Error at examples/CMakeLists.txt:9 (add_executable):
  Target "benchmark" links to target "VexCL::Backend" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?
Call Stack (most recent call first):
  examples/CMakeLists.txt:23 (add_vexcl_examples)

CMake Error at examples/CMakeLists.txt:9 (add_executable):
  Target "mba_benchmark" links to target "VexCL::Backend" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  examples/CMakeLists.txt:24 (add_vexcl_examples)

CMake Error at examples/CMakeLists.txt:9 (add_executable):
  Target "complex_spmv" links to target "VexCL::Backend" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  examples/CMakeLists.txt:26 (add_vexcl_examples)

CMake Error at examples/CMakeLists.txt:9 (add_executable):
  Target "complex_simple" links to target "VexCL::Backend" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
Call Stack (most recent call first):
  examples/CMakeLists.txt:25 (add_vexcl_examples)

-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    VEXCL_JIT_COMPILER_FLAGS

CMake Generate step failed.  Build files cannot be regenerated correctly.

This is what happened? look forward to your reply!

ddemidov commented 4 years ago

What are the exact values of the environment variables VEXCL_BACKEND and VEXCL_JIT_COMPILER_FLAGS that you are using in the command line?

zsw667291 commented 4 years ago

in .travis.yml image

it is same like yours

ddemidov commented 4 years ago

Do you get the error in Travis?

zsw667291 commented 4 years ago

i use command:
cmake -DVEXCL_TEST_COVERAGE=ON -DVEXCL_BUILD_TESTS=ON -DVEXCL_BUILD_EXAMPLES=ON -DVEXCL_BACKEND=${VEXCL_BACKEND} -DVEXCL_JIT_COMPILER_FLAGS=${VEXCL_JIT_COMPILER_FLAGS} ..

get the wrong result

zsw667291 commented 4 years ago

did u mean the value in CMakelist.txt?

ddemidov commented 4 years ago

Ok, then can you just use

cmake -DVEXCL_BUILD_TESTS=ON -DVEXCL_BUILD_EXAMPLES=ON ..

and see if that works? The command you use is intended to be used from inside Travis-CI.

zsw667291 commented 4 years ago

ok , use cmake -DVEXCL_BUILD_TESTS=ON -DVEXCL_BUILD_EXAMPLES=ON .. it's works ! thx a lot!

Denis345 commented 2 years ago

hi, i use command "cmake .." . As the result, i have this issue

cmake ..

CMake Error at /usr/local/lib/cmake/eosio.cdt/eosio.cdt-config.cmake:8 (include): include could not find load file:

EosioWasmToolchain

Call Stack (most recent call first): CMakeLists.txt:4 (find_package)

CMake Error at /usr/local/lib/cmake/eosio.cdt/eosio.cdt-config.cmake:11 (include): include could not find load file:

EosioCDTMacros

Call Stack (most recent call first): CMakeLists.txt:4 (find_package)

CMake Warning (dev) in CMakeLists.txt: No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 3.10)

should be added at the top of the file. The version specified may be lower if you wish to support older CMake versions for this project. For more information run "cmake --help-policy CMP0000". This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred! See also "/wax/src/wax/mycontract/wax/build/CMakeFiles/CMakeOutput.log".