[CMakeLists.txt] Fix BUILD_ARCH option#5
Open
jjolly wants to merge 1 commit intoCtopCsUtahEdu:r0.1from
Open
Conversation
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.
Contributor
Author
|
@ztuowen The BUILD_ARCH option was buggy when the default of 'native' was suppose to be selected. This fixes it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.