Shark-ML / Shark

The Shark Machine Leaning Library. See more:
http://shark-ml.github.io/Shark/
GNU Lesser General Public License v3.0
504 stars 131 forks source link

cmake Configuration Issue #262

Closed HaoZeke closed 5 years ago

HaoZeke commented 5 years ago

I am trying to build a shark project, however I am getting the following error:

CMake Error at src/CMakeLists.txt:65 (include):
  include called with wrong number of arguments.  include() only takes one
  file.

My cmake file is:

# Set the output folder where your program will be created
set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/bin)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})

# Add the new cpp files here
add_executable( yodaStruct
  main.cpp
  shark_structure.cpp
  )

# Project Libraries
include_directories(
  include/internal
  include/external
  ${LUA_INCLUDE_DIR}
  BEFORE ${SHARK_INCLUDE_DIRS}
  )

# Conan Stuff
include(Conan)
conan_cmake_run(CONANFILE ../conanfile.txt  # or relative build/conanfile.txt
                BASIC_SETUP CMAKE_TARGETS
                BUILD missing)

# Find packages, including conan packages
find_package(
  "Lua" REQUIRED
  "Shark" REQUIRED
  "yaml-cpp"
  "fmt"
  "rang")

# Link everything
target_link_libraries(yodaStruct
  ${LUA_LIBRARIES}
  ${SHARK_LIBRARIES}
  CONAN_PKG::rang
  CONAN_PKG::fmt
  CONAN_PKG::yaml-cpp)

# Cotire
include(Cotire)
cotire(yodaStruct)
include(${SHARK_USE_FILE})
Ulfgard commented 5 years ago

Is line 65 "include(${SHARK_USE_FILE})"?

Could you print out the contents of this?

message(STATUS ${SHARK_USE_FILE})


From: Rohit Goswami [notifications@github.com] Sent: Thursday, November 29, 2018 2:05 PM To: Shark-ML/Shark Cc: Subscribed Subject: [Shark-ML/Shark] cmake Configuration Issue (#262)

I am trying to build a shark project, however I am getting the following error:

CMake Error at src/CMakeLists.txt:65 (include): include called with wrong number of arguments. include() only takes one file.

My cmake file is:

Set the output folder where your program will be created

set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/bin) set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}) set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})

Add the new cpp files here

add_executable( yodaStruct main.cpp shark_structure.cpp )

Project Libraries

include_directories( include/internal include/external ${LUA_INCLUDE_DIR} BEFORE ${SHARK_INCLUDE_DIRS} )

Conan Stuff

include(Conan) conan_cmake_run(CONANFILE ../conanfile.txt # or relative build/conanfile.txt BASIC_SETUP CMAKE_TARGETS BUILD missing)

Find packages, including conan packages

find_package( "Lua" REQUIRED "Shark" REQUIRED "yaml-cpp" "fmt" "rang")

Link everything

target_link_libraries(yodaStruct ${LUA_LIBRARIES} ${SHARK_LIBRARIES} CONAN_PKG::rang CONAN_PKG::fmt CONAN_PKG::yaml-cpp)

Cotire

include(Cotire) cotire(yodaStruct) include(${SHARK_USE_FILE})

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/Shark-ML/Shark/issues/262, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOWTBs0TjX8iMyvLUFaasO--ulSpZFWpks5uz9uvgaJpZM4Y5opI.

HaoZeke commented 5 years ago

It is blank.. I have installed it in the regular way though... Where is this macro defined?

I have used (for shark):

cmake ..
make && sudo make install
HaoZeke commented 5 years ago

Sorry. I had mis-configured my project. Thanks for the prompt response, and the detailed tutorials!