kendryte / kendryte-standalone-sdk

Standalone SDK for kendryte K210
https://kendryte.com
Apache License 2.0
445 stars 162 forks source link

cmake error #65

Closed codecube47 closed 5 years ago

codecube47 commented 5 years ago

When I run cmake command I am getting path below error.


BUG REPORT

Document says run run below command

~/kendryte-standalone-sdk/build$ cmake ../.. -DPROJ=testpro -DTOOLCHAIN=/opt/kendryte-toolchain/bin && make

Below are the errors I am getting.

PROJ = testpro
-- Check for RISCV toolchain ...
-- Using /opt/kendryte-toolchain/bin RISCV toolchain
SOURCE_FILES=
CMake Error at cmake/executable.cmake:11 (add_executable):
  add_executable called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:30 (include)

CMake Error at cmake/executable.cmake:14 (set_target_properties):
  set_target_properties Can not find target to add properties to: testpro
Call Stack (most recent call first):
  CMakeLists.txt:30 (include)

CMake Error at cmake/executable.cmake:16 (target_link_libraries):
  Cannot specify link libraries for target "testpro" which is not built by
  this project.
Call Stack (most recent call first):
  CMakeLists.txt:30 (include)

System

Ubuntu 16.04

zzxcanaan commented 5 years ago

cmake .. -DPROJ=testpro -DTOOLCHAIN=/opt/kendryte-toolchain/bin && make NOT cmake ../..

chegewara commented 5 years ago

Hi, i am working with make, but i am newbie with cmake. I have prepared toolchain, but building with cmake does not work because SOURCE_FILES= is empty, which seems to be empty because cmake does not recognize add_source_files or is not setting variable with this command.

I did check cmake documentation but i cant find add_source_files in it: https://cmake.org/cmake/help/v3.10/manual/cmake-commands.7.html#project-commands

Any help will be appreciated.

EDIT ok, i found it is macro, but still its not working i am using ubuntu on windows 10

GongT commented 5 years ago

Whats your project and build command looks like?

You can try to add some MESSAGE("XXX=$XXX") to debug cmake.

chegewara commented 5 years ago

@GongT I think i found problem, ive read somewhere that ubuntu 18 is not compatible and i should use ubuntu 16.