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

compilation fix for architecture other than x86 #182

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ option(NDEBUG "Whether to suppress asserts and array bound checks" ON)

if (NATIVECPU)
add_definitions(-march=native -mtune=native)
else ()
add_definitions(-march=nocona -mtune=generic)
Copy link

Choose a reason for hiding this comment

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

I think it would be better to add else if x86 than to remove it.

Copy link
Author

@rafael2k rafael2k May 9, 2024

Choose a reason for hiding this comment

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

I dont know how to check the architecture with cmake. But as it is, compilation is artificially broken for any arch != x86_64 (when not using NATIVECPU).

endif (NATIVECPU)

if (DISABLE_ZLIB)
Expand Down
4 changes: 2 additions & 2 deletions build/build-linux.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cmake -G "Unix Makefiles" -DNDEBUG ..
make
cmake -G "Unix Makefiles" -DNDEBUG=ON ..
make