You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by jb...@apache.org on 2021/11/02 22:04:50 UTC

[geode-native] branch develop updated: GEODE-9741: Pass full toolkit version to external build systems. (#889)

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

jbarrett pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-native.git


The following commit(s) were added to refs/heads/develop by this push:
     new 2c15c5d  GEODE-9741: Pass full toolkit version to external build systems. (#889)
2c15c5d is described below

commit 2c15c5da57bd0a5ced3586fc4ccb47d15dcac0b6
Author: Jacob Barrett <ja...@vmware.com>
AuthorDate: Tue Nov 2 15:04:44 2021 -0700

    GEODE-9741: Pass full toolkit version to external build systems. (#889)
    
    * Require at least CMake 3.19.7 for 3 component toolkit version support.
    * LGTM downloads latest CMake.
---
 .lgtm.yml                         | 7 +++----
 CMakeLists.txt                    | 2 +-
 ci/base/base.yml                  | 2 +-
 dependencies/ACE/CMakeLists.txt   | 7 ++++++-
 dependencies/boost/CMakeLists.txt | 4 ++++
 5 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/.lgtm.yml b/.lgtm.yml
index 9d59bc9..83ec81f 100644
--- a/.lgtm.yml
+++ b/.lgtm.yml
@@ -3,14 +3,13 @@ extraction:
     configure:
       command:
         - GEODE_VERSION=1.14.0
-        - CMAKE_VERSION=3.18
         - mkdir _lgtm_build_dir
         - cd _lgtm_build_dir
         - wget -O apache-geode.tgz https://downloads.apache.org/geode/${GEODE_VERSION}/apache-geode-${GEODE_VERSION}.tgz
         - tar xzf apache-geode.tgz
-        - wget -O cmake.tgz https://cmake.org/files/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}.0-Linux-x86_64.tar.gz
-        - tar xzf cmake.tgz
-        - PATH="`pwd`/cmake-${CMAKE_VERSION}.0-Linux-x86_64/bin":$PATH
+        - "curl -o cmake.tgz -L $(curl -s https://api.github.com/repos/Kitware/CMake/releases | grep -P -i 'browser_download_url.*cmake-\\d+\\.\\d+\\.\\d+-linux-x86_64\\.sh' | head -n 1 | cut -d: -f 2,3 | tr -d \\\")"
+        - bash cmake.tgz --skip-license --prefix=`pwd`
+        - PATH="`pwd`/bin":$PATH
         - cmake -DGEODE_ROOT="`pwd`/apache-geode-${GEODE_VERSION}" ..
         - cd dependencies && cmake --build . -- -j2
     index:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9c3ed29..c12791d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-cmake_minimum_required(VERSION 3.18)
+cmake_minimum_required(VERSION 3.19.7)
 project(nativeclient LANGUAGES C CXX)
 
 option(USE_PCH "Use precompiled headers (PCH)." OFF)
diff --git a/ci/base/base.yml b/ci/base/base.yml
index a07224e..3633506 100644
--- a/ci/base/base.yml
+++ b/ci/base/base.yml
@@ -72,7 +72,7 @@ builds:
     with_dot_net: #@ True
     #@yaml/map-key-override
     params:
-      CMAKE_CONFIGURE_FLAGS: "-A x64 -Tv142,version=14.20,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0"
+      CMAKE_CONFIGURE_FLAGS: "-A x64 -Tv142,version=14.20.27508,host=x64 -DCMAKE_SYSTEM_VERSION=10.0.16299.0"
       CMAKE_BUILD_FLAGS: "/m"
       CPACK_GENERATORS: "ZIP"
 
diff --git a/dependencies/ACE/CMakeLists.txt b/dependencies/ACE/CMakeLists.txt
index 56eddc0..f48274c 100644
--- a/dependencies/ACE/CMakeLists.txt
+++ b/dependencies/ACE/CMakeLists.txt
@@ -64,6 +64,11 @@ if (${WIN32})
   set ( _COMMAND_PREFIX ${CMAKE_COMMAND} -E chdir ace )
 
   set ( _MSBUILD_FLAGS /m /p:Platform=${_PLATFORM} /p:Configuration=$<$<CONFIG:Debug>:Debug>$<$<NOT:$<CONFIG:Debug>>:Release>)
+
+  if(CMAKE_GENERATOR_TOOLSET MATCHES "version=([0-9]+\.[0-9]+\.[0-9]+)")
+    list(APPEND _MSBUILD_FLAGS /p:VCToolsVersion=${CMAKE_MATCH_1})
+  endif()
+
   set ( _MSBUILD_FLAGS_STATIC ${_MSBUILD_FLAGS} /t:ace_${MPC_TYPE}_static )
 
   include(ProcessorCount)
@@ -85,7 +90,7 @@ if (${WIN32})
                            -value_template staticflags+=ACE_AS_STATIC_LIBS
                            -value_template runtime_library=Multithreaded$<$<CONFIG:Debug>:Debug>Dll
   )
-  set ( _BUILD_COMMAND ${CMAKE_VS_MSBUILD_COMMAND} ACE_${MPC_TYPE}_static.sln ${_MSBUILD_FLAGS} ${_MSBUILD_FLAGS_STATIC}
+  set ( _BUILD_COMMAND ${CMAKE_VS_MSBUILD_COMMAND} ACE_${MPC_TYPE}_static.sln ${_MSBUILD_FLAGS_STATIC}
   )
   set ( _INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/lib <INSTALL_DIR>/lib
                  COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR>/ace <INSTALL_DIR>/include/ace
diff --git a/dependencies/boost/CMakeLists.txt b/dependencies/boost/CMakeLists.txt
index c575a1b..cd42a11 100644
--- a/dependencies/boost/CMakeLists.txt
+++ b/dependencies/boost/CMakeLists.txt
@@ -58,6 +58,10 @@ if ("SunOS" STREQUAL ${CMAKE_SYSTEM_NAME})
   list(APPEND BOOTSTRAP_FLAGS --with-toolset=sun)
   list(APPEND B2_FLAGS define=BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
 elseif(MSVC)
+  if(CMAKE_GENERATOR_TOOLSET MATCHES "version=([0-9]+\.[0-9]+\.[0-9]+)")
+    set(BOOTSTRAP_COMMAND ${CMAKE_COMMAND} -E env VCToolsVersion=${CMAKE_MATCH_1} ${BOOTSTRAP_COMMAND})
+    set(B2_COMMAND ${CMAKE_COMMAND} -E env VCToolsVersion=${CMAKE_MATCH_1} ${B2_COMMAND})
+  endif()
   list(APPEND BOOTSTRAP_FLAGS vc${MSVC_TOOLSET_VERSION})
   if (CMAKE_VS_PLATFORM_TOOLSET_VERSION)
 	list(APPEND B2_FLAGS toolset=msvc-${CMAKE_VS_PLATFORM_TOOLSET_VERSION})