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

Replace CMAKE_CURRENT_SOURCE_DIR to CMAKE_CURRENT_LIST_DIR #980

Merged
merged 1 commit into from
Jun 2, 2021

Conversation

phprus
Copy link
Contributor

@phprus phprus commented May 29, 2021

Replace CMAKE_CURRENT_SOURCE_DIR to CMAKE_CURRENT_LIST_DIR to allow reuse script cmake/detect-arch.cmake in parent CMake project.

@codecov
Copy link

codecov bot commented May 29, 2021

Codecov Report

Merging #980 (5030a46) into develop (07fa171) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #980   +/-   ##
========================================
  Coverage    75.81%   75.81%           
========================================
  Files           74       74           
  Lines         8082     8082           
  Branches      1344     1344           
========================================
  Hits          6127     6127           
  Misses        1425     1425           
  Partials       530      530           
Flag Coverage Δ
macos_clang 68.55% <ø> (ø)
macos_gcc 67.45% <ø> (ø)
ubuntu_clang_debug ?
ubuntu_clang_msan ∅ <ø> (∅)
ubuntu_gcc 68.70% <ø> (ø)
ubuntu_gcc_aarch64 68.98% <ø> (ø)
ubuntu_gcc_aarch64_compat_no_opt 67.32% <ø> (ø)
ubuntu_gcc_aarch64_no_acle 67.89% <ø> (ø)
ubuntu_gcc_aarch64_no_neon 68.29% <ø> (ø)
ubuntu_gcc_armhf 68.97% <ø> (ø)
ubuntu_gcc_armhf_compat_no_opt 67.32% <ø> (ø)
ubuntu_gcc_armhf_no_acle 69.13% <ø> (ø)
ubuntu_gcc_armhf_no_neon 69.46% <ø> (ø)
ubuntu_gcc_armsf 68.98% <ø> (ø)
ubuntu_gcc_armsf_compat_no_opt 67.32% <ø> (ø)
ubuntu_gcc_compat_no_opt 68.71% <ø> (ø)
ubuntu_gcc_mingw_i686 0.00% <ø> (ø)
ubuntu_gcc_mingw_x86_64 0.00% <ø> (ø)
ubuntu_gcc_no_avx2 69.06% <ø> (ø)
ubuntu_gcc_no_pclmulqdq 66.88% <ø> (ø)
ubuntu_gcc_no_sse2 68.11% <ø> (ø)
ubuntu_gcc_no_sse4 66.85% <ø> (ø)
ubuntu_gcc_o3 68.43% <ø> (ø)
ubuntu_gcc_osb 70.98% <ø> (ø)
ubuntu_gcc_ppc 69.16% <ø> (ø)
ubuntu_gcc_ppc64 69.95% <ø> (ø)
ubuntu_gcc_ppc64le 68.65% <ø> (ø)
ubuntu_gcc_s390x 67.90% <ø> (ø)
ubuntu_gcc_sparc64 70.35% <ø> (ø)
win64_gcc 70.39% <ø> (ø)
win64_gcc_compat_no_opt 73.88% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 07fa171...5030a46. Read the comment docs.

@Dead2
Copy link
Member

Dead2 commented May 30, 2021

Could you explain the use-case here? It is a little unclear what problem you are trying to solve here.

@mtl1979
Copy link
Collaborator

mtl1979 commented May 30, 2021

@Dead2 The change allows using include() instead of add_subdirectory() when parent project wants to use functions declared by build system of zlib-ng (CMakeLists.txt and any files directly or indirectly included from it).

I'm not completely sure if we would want to allow that.

@phprus
Copy link
Contributor Author

phprus commented May 30, 2021

This change will allow create a configuration like this:

project(BaseProject)

include(zlib-ng/cmake/detect-arch.cmake)

if(BASEARCH_X86_FOUND)
    # x86 project options
    ...
endif()

...

add_subdirectory(zlib-ng)

...

target_link_libraries(exe
    PRIVATE
        zlibstatic
)

To reuse the architecture detection code from zlib-ng.

@Dead2 Dead2 merged commit 025b27e into zlib-ng:develop Jun 2, 2021
Dead2 added a commit that referenced this pull request Jun 11, 2021
- Minor code cleanup #983 #984
- Fix mpicc compilation #959
- Fix build on NetBSD #964
- Fix build on OpenBSD #970
- Fix build on Cygwin #972 #974
- Fix linter warnings in configure #975
- Spelling fixes #961
- Improve unistd.h handling #960
- Remove stdarg.h detection #976
- CI/Test improvements #977 #981 #985
- Cmake improvements #980
Dead2 added a commit that referenced this pull request Jun 11, 2021
- Minor code cleanup #983 #984
- Fix mpicc compilation #959
- Fix build on NetBSD #964
- Fix build on OpenBSD #970
- Fix build on Cygwin #972 #974
- Fix linter warnings in configure #975
- Spelling fixes #961
- Improve unistd.h handling #960
- Remove stdarg.h detection #976
- CI/Test improvements #977 #981 #985
- Cmake improvements #980 #989
Dead2 added a commit that referenced this pull request Jun 11, 2021
- Fix inflate corruption #982
- Minor code cleanup #983 #984
- Fix mpicc compilation #959
- Fix build on NetBSD #964
- Fix build on OpenBSD #970
- Fix build on Cygwin #972 #974
- Fix linter warnings in configure #975
- Spelling fixes #961
- Improve unistd.h handling #960
- Remove stdarg.h detection #976
- CI/Test improvements #977 #981 #985
- Cmake improvements #980 #989
@Dead2 Dead2 mentioned this pull request Jun 11, 2021
Dead2 added a commit that referenced this pull request Jun 11, 2021
- Fix inflate corruption #982
- Minor code cleanup #983 #984
- Fix mpicc compilation #959
- Fix build on NetBSD #964
- Fix build on OpenBSD #970
- Fix build on Cygwin #972 #974
- Fix linter warnings in configure #975
- Spelling fixes #961
- Improve unistd.h handling #960
- Remove stdarg.h detection #976
- CI/Test improvements #977 #981 #985
- Cmake improvements #980 #989
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.

None yet

3 participants