-
Notifications
You must be signed in to change notification settings - Fork 79
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
CMake update. #25
CMake update. #25
Conversation
Signed-off-by: Ningfei Li <ningfei.li@gmail.com>
Also remove 'zconf.h', it will be generated during building.
Clean up. Add option to set runtime (useful for MSVC). Add 'SSE4.2' and 'AVX' option. Signed-off-by: Ningfei Li <ningfei.li@gmail.com>
Also remove checking fseeko. Signed-off-by: Ningfei Li <ningfei.li@gmail.com>
Signed-off-by: Ningfei Li <ningfei.li@gmail.com>
Signed-off-by: Ningfei Li <ningfei.li@gmail.com>
Signed-off-by: Ningfei Li <ningfei.li@gmail.com>
Signed-off-by: Ningfei Li <ningfei.li@gmail.com>
Signed-off-by: Ningfei Li <ningfei.li@gmail.com>
SSE4.2 and PCLMUL are also supported.
check_c_compiler_flag detects SSE2, SSE3, SSE42 and PCLMUL but compiling fails. Workaround fix, need further investigation.
CMakeLists.txt
Outdated
endif() | ||
elseif(MSVC) | ||
set(CMAKE_DEBUG_POSTFIX "d") | ||
add_definitions(-D_CRT_SECURE_NO_DEPRECATE) | ||
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) | ||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4018") # '<': signed/unsigned mismatch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should instead fix those warnings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will check it again using MSVC. I think this only happens when we use MSVC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can fix them myself really.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!
endif() | ||
|
||
# append "inffast_chunk.c" and compile with "sse2" if supported by compiler | ||
if(HAS_SSE2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both SSE2 and SSSE3 checks are redundant, since they are present on all x86-64 CPUs anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, then I will add the flags and definitions directly. I added these two checks just recently since I saw they were checked in the configure
This PR is part of the efforts @neurolabusc and I started to fix and tweak the compiling using CMake, especially on Windows. Some parts had already been merged in #19. The current PR further includes:
comments are welcome :)