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

Check architecture of the target system to optimise popcnt #5182

Merged
merged 1 commit into from
Apr 25, 2022

Conversation

giordano
Copy link
Contributor

@giordano giordano commented Apr 9, 2022

What does this implement/fix? Explain your changes.

When you have to make decisions based on the capabilities of the system, you
must check the target system, not the host one. It doesn't make any sense to
look at the host system when doing cross-compilation from a different
architecture.

Copy link
Member

@greglandrum greglandrum left a comment

Choose a reason for hiding this comment

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

I'm not sure this is 100% correct, but want to confirm

CMakeLists.txt Outdated
@@ -66,9 +66,9 @@ set(RDK_BOOST_VERSION "1.58.0")

if(NOT MSVC)
if(RDK_OPTIMIZE_POPCNT)
if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "aarch64")
if(CMAKE_HOST_PROCESSOR STREQUAL "aarch64")
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this also be CMAKE_SYSTEM_PROCESSOR?

Copy link
Contributor Author

@giordano giordano Apr 16, 2022

Choose a reason for hiding this comment

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

Yes, that was wrong 🤦 Fixed, thanks

When you have to make decisions based on the capabilities of the system, you
must check the *target* system, not the host one.  It doesn't make any sense to
look at the host system when doing cross-compilation from a different
architecture.
@greglandrum greglandrum added bug infrastructure build infrastructure and the like labels Apr 17, 2022
@greglandrum greglandrum added this to the 2022_03_2 milestone Apr 17, 2022
@greglandrum greglandrum merged commit ca926ff into rdkit:master Apr 25, 2022
@giordano giordano deleted the mg/cmake-popcnt branch April 25, 2022 05:52
greglandrum pushed a commit that referenced this pull request Apr 25, 2022
When you have to make decisions based on the capabilities of the system, you
must check the *target* system, not the host one.  It doesn't make any sense to
look at the host system when doing cross-compilation from a different
architecture.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug infrastructure build infrastructure and the like
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants