Skip to content
Merged
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
5 changes: 4 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ if(PROJ_COMPILER_FRONTEND STREQUAL "MSVC")
add_compile_options(-D_CRT_SECURE_NO_WARNINGS)
add_compile_options(-permissive- -d2FH4- -Zc:strictStrings-)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_compile_options(-Wno-unused-variable -Wno-unused-function)
add_compile_options(-march=haswell)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

FYI: I used this because specifying -mavx2 -mbmi2 like the script is doing for regular GCC/Clang wasn't enough. I got the following error about missing lzcnt support, and using -march=haswell fixed it:

src\BasicMath.cpp(2154,46): error : always_inline function '_lzcnt_u64' requires target feature 'lzcnt', but would be inlined into function 'PossiblyUpcast' that is compiled without support for 'lzcnt'

Copy link
Contributor

Choose a reason for hiding this comment

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

[nit] pls add indent

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ugh, sorry, I missed this comment before merging. Next time I'm poking around in here I'll fix the indentation.

add_compile_options(-Wno-unused-function)
add_compile_options(-Wno-unknown-pragmas -Wno-unused-variable -Wno-unused-parameter -Wno-ignored-attributes)
add_compile_options(-Wno-format) # TODO: Remove this and fix all the printf format mismatches
endif()
elseif(PROJ_COMPILER_FRONTEND STREQUAL "GNU")
add_compile_options("$<$<CONFIG:Debug>:-O0>")
Expand Down