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

CMake update. #25

Merged
merged 54 commits into from
Dec 2, 2020
Merged

CMake update. #25

merged 54 commits into from
Dec 2, 2020

Conversation

ningfei
Copy link

@ningfei ningfei commented Nov 18, 2020

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:

  1. Fix compiling on Windows using MinGW.
  2. Fix compiling DLL on Windows using MSVC.
  3. Fix setting static runtime when using GCC.
  4. Add optimization support for ARMv8 Neon.
  5. Fix compiling on Apple M1.
  6. Refine checking compiler flags (intrinsics and visibility)
  7. Change modes of some src file from 755 to 644.

comments are welcome :)

ningfei and others added 30 commits May 28, 2018 21:57
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>
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
Copy link

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?

Copy link
Author

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.

Copy link

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.

Copy link
Author

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)
Copy link

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.

Copy link
Author

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

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.

3 participants