You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2020/07/10 21:35:01 UTC

[qpid-proton] 01/02: PROTON-2208: Remove ability to compile proton-c as C++ - No longer needed with windows minimum VS2015 as it supports sufficient C99 to compile proton-c as C.

This is an automated email from the ASF dual-hosted git repository.

astitcher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git

commit 9c1ab44237af8684693eeb1f14f035e0c3258989
Author: Andrew Stitcher <as...@apache.org>
AuthorDate: Fri Jul 10 17:10:57 2020 -0400

    PROTON-2208: Remove ability to compile proton-c as C++
    - No longer needed with windows minimum VS2015 as it supports sufficient C99
      to compile proton-c as C.
---
 CMakeLists.txt              | 22 +++-------------------
 c/CMakeLists.txt            | 12 ------------
 c/tests/fuzz/CMakeLists.txt |  9 ---------
 c/tools/CMakeLists.txt      |  4 ----
 4 files changed, 3 insertions(+), 44 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c596219..cd63da1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,23 +50,11 @@ set (PN_C_LIBRARY_DIR "${CMAKE_BINARY_DIR}/c")
 set (PN_C_SOURCE_DIR "${CMAKE_BINARY_DIR}/c/src")
 
 ## C++
-
 check_language (CXX)
-
 if (CMAKE_CXX_COMPILER)
   enable_language(CXX)
 endif()
 
-# TODO - Should change this test to take account of recent MSVC that does support C99
-if (MSVC)
-  # No C99 capability, use C++
-  set(DEFAULT_BUILD_WITH_CXX ON)
-endif (MSVC)
-
-if (CMAKE_CXX_COMPILER)
-  option(BUILD_WITH_CXX "Compile Proton using C++" ${DEFAULT_BUILD_WITH_CXX})
-endif()
-
 # Build static C and C++ libraries in addition to shared libraries.
 option(BUILD_STATIC_LIBS "Build static libraries as well as shared libraries" OFF)
 
@@ -145,13 +133,9 @@ if (CMAKE_COMPILER_IS_GNUCC)
   set (COMPILE_WARNING_FLAGS "${WERROR} -Wall -pedantic-errors")
   # C++ allow "%z" format specifier and variadic macros
   set (CXX_WARNING_FLAGS "${COMPILE_WARNING_FLAGS} -Wno-format -Wno-variadic-macros")
-  if (NOT BUILD_WITH_CXX)
-    set (COMPILE_WARNING_FLAGS "${COMPILE_WARNING_FLAGS} -Wstrict-prototypes -Wc++-compat -Wvla -Wsign-compare -Wwrite-strings")
-    set (COMPILE_LANGUAGE_FLAGS "-std=c99")
-    set (COMPILE_PLATFORM_FLAGS "-std=gnu99")
-  else (NOT BUILD_WITH_CXX)
-    set (COMPILE_WARNING_FLAGS "${CXX_WARNING_FLAGS}")
-  endif (NOT BUILD_WITH_CXX)
+  set (COMPILE_WARNING_FLAGS "${COMPILE_WARNING_FLAGS} -Wstrict-prototypes -Wc++-compat -Wvla -Wsign-compare -Wwrite-strings")
+  set (COMPILE_LANGUAGE_FLAGS "-std=c99")
+  set (COMPILE_PLATFORM_FLAGS "-std=gnu99")
 
   if (ENABLE_UNDEFINED_ERROR)
     set (CATCH_UNDEFINED "-Wl,--no-undefined")
diff --git a/c/CMakeLists.txt b/c/CMakeLists.txt
index f0f7f83..bb1d480 100644
--- a/c/CMakeLists.txt
+++ b/c/CMakeLists.txt
@@ -405,18 +405,6 @@ set_source_files_properties (
   COMPILE_DEFINITIONS "${PLATFORM_DEFINITIONS}"
   )
 
-if (BUILD_WITH_CXX)
-  set_source_files_properties (
-    ${qpid-proton-core}
-    ${qpid-proton-proactor}
-    ${qpid-proton-layers}
-    ${qpid-proton-extra}
-    ${qpid-proton-platform}
-    ${qpid-proton-platform-io}
-    PROPERTIES LANGUAGE CXX
-    )
-endif (BUILD_WITH_CXX)
-
 set(qpid-proton-core-src
   ${qpid-proton-core}
   ${qpid-proton-layers}
diff --git a/c/tests/fuzz/CMakeLists.txt b/c/tests/fuzz/CMakeLists.txt
index d84a250..163a9db 100644
--- a/c/tests/fuzz/CMakeLists.txt
+++ b/c/tests/fuzz/CMakeLists.txt
@@ -96,12 +96,3 @@ endif()
 
 # pni_sniff_header is internal so it has to be compiled specially
 pn_add_fuzz_test (fuzz-sniff-header fuzz-sniff-header.c ${PN_C_SOURCE_DIR}/core/autodetect.c)
-
-if (BUILD_WITH_CXX)
-  set_source_files_properties (
-    StandaloneFuzzTargetMain.c
-    StandaloneFuzzTargetInit.c
-    ${fuzz_test_src}
-    PROPERTIES LANGUAGE CXX
-  )
-endif (BUILD_WITH_CXX)
diff --git a/c/tools/CMakeLists.txt b/c/tools/CMakeLists.txt
index 7a577cb..82df6d8 100644
--- a/c/tools/CMakeLists.txt
+++ b/c/tools/CMakeLists.txt
@@ -47,7 +47,3 @@ set_target_properties (
   COMPILE_FLAGS "${COMPILE_WARNING_FLAGS} ${COMPILE_LANGUAGE_FLAGS}"
   COMPILE_DEFINITIONS "${PLATFORM_DEFINITIONS}"
 )
-
-if (BUILD_WITH_CXX)
-  set_source_files_properties (msgr-recv.c msgr-send.c msgr-common.c reactor-recv.c reactor-send.c PROPERTIES LANGUAGE CXX)
-endif (BUILD_WITH_CXX)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org