-
Notifications
You must be signed in to change notification settings - Fork 84
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
test: remove CMAKE_C_STANDARD #714
Conversation
Example:
-> The compiler is still using "-std=c11" it looks like CMAKE_C_STANDARD is hardcoded in the CMake file. When building with a C99 compiler the test try_into fails due to missing definitions. |
I think both have to be removed, since test is loaded with subdirectory: diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1cf5ec4..e340e10 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -53,7 +53,6 @@ option(USE_RTMP "Enable RTMP" ON)
option(USE_SIP "Enable SIP" ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
-set(CMAKE_C_STANDARD 11)
set(CMAKE_C_EXTENSIONS OFF)
if(MSVC)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index bd5a213..790ab1f 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -30,7 +30,6 @@ option(USE_SANITIZER "Sanitizers like: address, thread, undefined, memory")
include(sanitizer)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
-set(CMAKE_C_STANDARD 11)
set(CMAKE_C_EXTENSIONS OFF)
set(CMAKE_BUILD_TYPE Debug) |
This fixes try_into tests: #717 |
I guess the compiler will use the default standard, if not specified. With this change, the C99 CI check should work. |
build failed, as expected:
lets merge the "C99 dbg" first ... |
this should be working now ... |
the current C99 action test is broken
The code is always compiled with C11.