You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2017/11/15 21:05:30 UTC

[06/31] qpid-proton git commit: PROTON-1611: Fix that meets the high standards of aconway!

PROTON-1611: Fix that meets the high standards of aconway!


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/b9bb35b1
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/b9bb35b1
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/b9bb35b1

Branch: refs/heads/go1
Commit: b9bb35b1573cedc11f8734441d046b6e28934c9c
Parents: 79cc60f
Author: Andrew Stitcher <as...@apache.org>
Authored: Thu Oct 19 19:06:02 2017 -0400
Committer: Andrew Stitcher <as...@apache.org>
Committed: Fri Oct 20 15:21:44 2017 -0400

----------------------------------------------------------------------
 CMakeLists.txt                   | 13 ++++++++++---
 appveyor.yml                     |  5 ++++-
 proton-c/bindings/CMakeLists.txt |  7 +++----
 3 files changed, 17 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/b9bb35b1/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3bec2d1..75310bd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,8 +18,7 @@
 #
 cmake_minimum_required (VERSION 2.8.7)
 
-# project defaults to C and C++ languages
-project (Proton)
+project (Proton C)
 
 # Enable testing
 enable_testing()
@@ -28,13 +27,21 @@ include (CTest)
 # Pull in local cmake modules
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/tools/cmake/Modules/")
 
+include (CheckLanguage)
+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)
 
-option(BUILD_WITH_CXX "Compile Proton using C++" ${DEFAULT_BUILD_WITH_CXX})
+if (CMAKE_CXX_COMPILER)
+  option(BUILD_WITH_CXX "Compile Proton using C++" ${DEFAULT_BUILD_WITH_CXX})
+endif()
 
 if (CMAKE_CONFIGURATION_TYPES)
   # There is no single "build type"...

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/b9bb35b1/appveyor.yml
----------------------------------------------------------------------
diff --git a/appveyor.yml b/appveyor.yml
index 0ee66ad..49f17ad 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,5 +1,7 @@
 version: '{branch}.{build}'
 configuration: RelWithDebInfo
+environment:
+  CMAKE_GENERATOR: Visual Studio 12
 install:
 - cinst -y swig
 cache:
@@ -8,9 +10,10 @@ cache:
 before_build:
 - mkdir BLD
 - cd BLD
-- cmake -G "Visual Studio 12" -DBUILD_PERL=no  %QPID_PROTON_CMAKE_ARGS% ..
+- cmake -G "%CMAKE_GENERATOR%" -DBUILD_PERL=no  %QPID_PROTON_CMAKE_ARGS% ..
 - cd ..
 build:
+  project: BLD/Proton.sln
   parallel: true
   verbosity: normal
 test_script:

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/b9bb35b1/proton-c/bindings/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/bindings/CMakeLists.txt b/proton-c/bindings/CMakeLists.txt
index 9a431d7..5362f92 100644
--- a/proton-c/bindings/CMakeLists.txt
+++ b/proton-c/bindings/CMakeLists.txt
@@ -31,10 +31,9 @@ if (EMSCRIPTEN_FOUND)
   set (DEFAULT_JAVASCRIPT ON)
 endif (EMSCRIPTEN_FOUND)
 
-# It is impossible to easily test for the presence of a C++ compiler! so set this on by default
-# That is because the OPTIONAL attribute to enable_language() does nothing (as of CMake 3.9.1)
-# so if C++ is not present the build will fail anyway!
-set (DEFAULT_CPP ON)
+if (CMAKE_CXX_COMPILER)
+  set (DEFAULT_CPP ON)
+endif()
 
 # Prerequisites for Go
 find_program(GO_EXE go)


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