8000 Fix make install error by LimHyungTae · Pull Request #1 · MIT-SPARK/ROBIN · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix make install error #1

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

Merged
merged 7 commits into from
May 23, 2024

Conversation

LimHyungTae
Copy link
Member

I want to make ROBIN available on another package via find_package(ROBIN REQUIRED)
8f92692: (minor) Add .gitignore

3d927dd: I think they should go to /usr/local/lib/cmake/robin; however, the original CMakeLists.txt points out /usr/local/lib/robin/cmake

85a174e: Without this install command, the following error occurs:

CMake Error at CMakeLists.txt:10 (find_package):
  Found package configuration file:

    /usr/local/lib/cmake/robin/robinConfig.cmake

  but it set robin_FOUND to FALSE so package "robin" is considered to be NOT
  FOUND.  Reason given by package:

  The following imported targets are referenced, but are missing:
  xenium::xenium pmc::pmc

edf91ab: Since the header files are placed in the include/robin, so setting DIRECTORY as include makes their directory as follows:

-- Up-to-date: /usr/local/include/include/robin
-- Up-to-date: /usr/local/include/include/robin/robin.hpp
-- Up-to-date: /usr/local/include/include/robin/core.hpp
-- Up-to-date: /usr/local/include/include/robin/utils.hpp
-- Up-to-date: /usr/local/include/include/robin/graph_io.hpp
-- Up-to-date: /usr/local/include/include/robin/views.hpp
...

So I fixed it.

b4cde06: Resolve all the issues of xenium. a) no xeniumConfig.cmake issue and b) no header file issue in the /usr/local/include.

@LimHyungTae
Copy link
Member Author
LimHyungTae commented May 22, 2024

Here are my small unit CMakeLists.txt and main.cpp files

CMakeLists.txt

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

cmake_minimum_required(VERSION 3.10)
project(MyProject2)

# Find the MyProject package
find_package(robin REQUIRED)
find_package(xenium REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(OpenMP REQUIRED)

# Add the source files
set(SOURCES
    src/main.cpp
)

# Create an executable from the source files
add_executable(MyProject2Executable ${SOURCES})

# Link the MyProject library and Boost libraries
target_link_libraries(MyProject2Executable robin::robin)

src/main.cpp

#include <robin/robin.hpp>

int main() {
  int N = 10;
  Eigen::Matrix<double, 6, Eigen::Dynamic> src_robin(6, N);
  Eigen::Matrix<double, 6, Eigen::Dynamic> tgt_robin(6, N);
  
  for (int j = 0; j < N; ++j) {
    src_robin(0, j) = 1; 
    src_robin(1, j) = 2;
    src_robin(2, j) = 3;
    src_robin(3, j) = 0.3;
    src_robin(4, j) = 0.3;
    src_robin(5, j) = 0.9055;

    tgt_robin(0, j) = 3;
    tgt_robin(1, j) = 4;
    tgt_robin(2, j) = 5;
    tgt_robin(3, j) = 0.3;
    tgt_robin(4, j) = 0.3;
    tgt_robin(5, j) = 0.9055;
  }

  Eigen::Vector2d noise_bound;
  noise_bound << 0.2, 0.3;
  std::cout << "Loading robin?" << std::endl;
  auto *g = robin::Make3dNormalRegInvGraph(src_robin, tgt_robin, noise_bound);
  std::cout << "=> Done" << std::endl;
  return 0;
}

Output in cmd
Loading robin?
=> Done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a newline character at the end

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reflected

@jingnanshi jingnanshi merged commit 62d73c7 into MIT-SPARK:master May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0