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

Explicitly specify the project is a C project if tests aren't used. #1055

Merged
merged 1 commit into from
Mar 4, 2023
Merged

Explicitly specify the project is a C project if tests aren't used. #1055

merged 1 commit into from
Mar 4, 2023

Conversation

dundargoc
Copy link

CMake assumes the default project uses both C and C++, and therefore will fail if both a C and a C++ compiler isn't found. This essentially blocks pure C projects from using msgpack-c if their users also don't have a C++ compiler.

Just specifying that the project is "C" isn't possible though, as the test themselves use C++. The workaround here is that we specify the project needs both a C and C++ compiler if tests are used, but only a C compiler if the tests aren't used.

CMake assumes the default project uses both C and C++, and therefore
will fail if both a C and a C++ compiler isn't found. This essentially
blocks pure C projects from using msgpack-c if they also don't have a
C++ compiler.

Just specifying that the project is "C" isn't possible though, as the
test themselves use C++. The workaround here is that we specify the
project needs both a C and C++ compiler if tests are used, but only a C
compiler if the tests aren't used.
@codecov-commenter
Copy link

codecov-commenter commented Mar 4, 2023

Codecov Report

Merging #1055 (f682086) into c_master (b3de6f8) will not change coverage.
The diff coverage is n/a.

❗ Current head f682086 differs from pull request most recent head 2f54392. Consider uploading reports for the commit 2f54392 to get more accurate results

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff            @@
##           c_master    #1055   +/-   ##
=========================================
  Coverage     55.45%   55.45%           
=========================================
  Files             8        8           
  Lines          1044     1044           
=========================================
  Hits            579      579           
  Misses          465      465           

@redboltz
Copy link
Contributor

redboltz commented Mar 4, 2023

Thanks! LGTM.

@redboltz redboltz merged commit 6e8503f into msgpack:c_master Mar 4, 2023
@dundargoc dundargoc deleted the build/only-c branch March 4, 2023 13:42
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this pull request Apr 25, 2023
msgpack is written in c, so only enforce a c compiler

upstream: msgpack/msgpack-c#1055

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this pull request Apr 25, 2023
msgpack is written in c, so only enforce a c compiler

upstream: msgpack/msgpack-c#1055

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this pull request Apr 26, 2023
msgpack is written in c, so only enforce a c compiler

upstream: msgpack/msgpack-c#1055

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this pull request Apr 27, 2023
msgpack is written in c, so only enforce a c compiler

upstream: msgpack/msgpack-c#1055

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this pull request Apr 29, 2023
msgpack is written in c, so only enforce a c compiler

upstream: msgpack/msgpack-c#1055

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this pull request Apr 29, 2023
msgpack is written in c, so only enforce a c compiler

upstream: msgpack/msgpack-c#1055

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
ThomasDevoogdt added a commit to ThomasDevoogdt/fluent-bit that referenced this pull request May 4, 2023
msgpack is written in c, so only enforce a c compiler

upstream: msgpack/msgpack-c#1055

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
leonardo-albertovich pushed a commit to fluent/fluent-bit that referenced this pull request May 8, 2023
msgpack is written in c, so only enforce a c compiler

upstream: msgpack/msgpack-c#1055

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
andreswebs pushed a commit to andreswebs/fluent-bit that referenced this pull request May 9, 2023
msgpack is written in c, so only enforce a c compiler

upstream: msgpack/msgpack-c#1055

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
@redboltz redboltz added the C label Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants