Skip to content
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

ruy: update to support Conan 2.0 #16688

Merged

Conversation

jcar87
Copy link
Contributor

@jcar87 jcar87 commented Mar 24, 2023

Specify library name and version: ruy/all

Changes in this PR:

  • Use newer Conan 2.0 integrations, while maintaining compatibility with Conan 1.x
  • Remove older version which has outdated CMake scripts, with limitations. Newer versions are more "conventional modern cmake" - this allows us to remove workarounds to handle the cpuinfo dependency
  • Add workaround to ensure that cmake_minimum_required() is the first thing called in the project - this is an upstream issue which has been reported: cmake_minimum_required is called after project() google/ruy#328
  • Bump dependency on cpuinfo to latest

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@jcar87 jcar87 self-assigned this Mar 31, 2023
@conan-center-bot

This comment has been minimized.

recipes/ruy/all/conanfile.py Outdated Show resolved Hide resolved

class TestPackageConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake", "cmake_find_package"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
generators = "cmake", "cmake_find_package"
generators = "cmake", "cmake_find_package_multi"

Comment on lines +1 to +11
cmake_minimum_required(VERSION 3.1)
project(test_package CXX)

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)

find_package(ruy REQUIRED)

add_executable(${PROJECT_NAME} test_package.cpp)
target_link_libraries(${PROJECT_NAME} ruy::ruy)
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
cmake_minimum_required(VERSION 3.1)
project(test_package CXX)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)
find_package(ruy REQUIRED)
add_executable(${PROJECT_NAME} test_package.cpp)
target_link_libraries(${PROJECT_NAME} ruy::ruy)
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11)
cmake_minimum_required(VERSION 3.1)
project(test_package)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package
${CMAKE_CURRENT_BINARY_DIR}/test_package)

@@ -0,0 +1,27 @@
#include <cstdint>
Copy link
Contributor

Choose a reason for hiding this comment

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

file to remove

recipes/ruy/all/test_package/conanfile.py Outdated Show resolved Hide resolved
recipes/ruy/all/test_package/conanfile.py Outdated Show resolved Hide resolved
recipes/ruy/all/test_package/CMakeLists.txt Outdated Show resolved Hide resolved
recipes/ruy/all/test_package/CMakeLists.txt Outdated Show resolved Hide resolved
czoido
czoido previously approved these changes Apr 11, 2023
@czoido czoido mentioned this pull request Apr 12, 2023
3 tasks
Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com>
jcar87 and others added 4 commits April 12, 2023 09:43
Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com>
Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com>
Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com>
Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com>
@jcar87 jcar87 marked this pull request as ready for review April 12, 2023 08:47
@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 11 (b04b017b38ff3ffda77c72ab4cf2e0f2a15ce055):

  • ruy/cci.20220628@:
    All packages built successfully! (All logs)

Conan v2 pipeline (informative, not required for merge) ✔️

Note: Conan v2 builds are informative and they are not required for the PR to be merged.

All green in build 13 (b04b017b38ff3ffda77c72ab4cf2e0f2a15ce055):

  • ruy/cci.20220628@:
    All packages built successfully! (All logs)

@conan-center-bot conan-center-bot merged commit 037e34c into conan-io:master Apr 12, 2023
MartinDelille pushed a commit to MartinDelille/conan-center-index that referenced this pull request Apr 12, 2023
* ruy: update to support Conan 2.0

* ruy: fixes

* ruy: remove cmake generated files

* ruy: remove old version

* ruy: fix test_package when cppstd is not defined in the profile (conan 1.x)

* ruy: fix order of cmake_minimum_required invocation

* ruy: export all symbols on windows to support shared

* Update recipes/ruy/all/conanfile.py

Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com>

* Update recipes/ruy/all/test_package/conanfile.py

Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com>

* Update recipes/ruy/all/test_package/conanfile.py

Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com>

* Update recipes/ruy/all/test_package/CMakeLists.txt

Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com>

* Update recipes/ruy/all/test_package/CMakeLists.txt

Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com>

---------

Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com>
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.

5 participants