Skip to content

Conversation

@jjolly
Copy link
Contributor

@jjolly jjolly commented May 25, 2022

The CMake option function is intended for ON/OFF operations. When using
"native" as a default, option would set BUILD_ARCH to "OFF" if not used
on the command line. This would cause the build architecture detection
to fail.

In this fix the option function is used properly and, if not used on the
command line, sets a default of "native". Also, if neither -march or
-mcpu work successfully, "native" is used as a fall-back.

The CMake option function is intended for ON/OFF operations. When using
"native" as a default, option would set BUILD_ARCH to "OFF" if not used
on the command line. This would cause the build architecture detection
to fail.

In this fix the option function is used properly and, if not used on the
command line, sets a default of "native". Also, if neither -march or
-mcpu work successfully, "native" is used as a fall-back.
@jjolly
Copy link
Contributor Author

jjolly commented May 25, 2022

@ztuowen The BUILD_ARCH option was buggy when the default of 'native' was suppose to be selected. This fixes it.

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.

1 participant