Skip to content

Commit e92e8e1

Browse files
committed
Updated minimum cmake requirement to be 3.19
1 parent 717f066 commit e92e8e1

File tree

38 files changed

+41
-41
lines changed

38 files changed

+41
-41
lines changed

.github/workflows/build_macos.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Set up CMake
3030
uses: jwlawson/actions-setup-cmake@v2
3131
with:
32-
cmake-version: '3.14.0'
32+
cmake-version: '3.19.0'
3333
- name: Set up Xcode
3434
uses: maxim-lobanov/setup-xcode@v1
3535
with:

.github/workflows/build_ubuntu.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Set up CMake
3030
uses: jwlawson/actions-setup-cmake@v2
3131
with:
32-
cmake-version: '3.14.0'
32+
cmake-version: '3.19.0'
3333
- name: Set up GCC
3434
uses: egor-tensin/setup-gcc@v1
3535
with:

.github/workflows/build_windows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- {
2727
name: Windows MSVC 2019,
2828
os: windows-2019,
29-
cmake: '3.14.0'
29+
cmake: '3.19.0'
3030
}
3131
- {
3232
name: Windows MSVC 2022,

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
project(pytorch-cpp VERSION 1.0.0 LANGUAGES CXX)
44

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<br />
77
<img src="https://img.shields.io/github/license/prabhuomkar/pytorch-cpp">
88
<img src="https://img.shields.io/badge/libtorch-2.3.0-ee4c2c">
9-
<img src="https://img.shields.io/badge/cmake-3.14-064f8d">
9+
<img src="https://img.shields.io/badge/cmake-3.19-064f8d">
1010
</p>
1111

1212

@@ -51,7 +51,7 @@ This repository provides tutorial code in C++ for deep learning researchers to l
5151
## Requirements
5252

5353
1. [C++-17](http://www.cplusplus.com/doc/tutorial/introduction/) compatible compiler
54-
2. [CMake](https://cmake.org/download/) (minimum version 3.14)
54+
2. [CMake](https://cmake.org/download/) (minimum version 3.19)
5555
3. [LibTorch version >= 1.12.0 and <= 2.3.0](https://pytorch.org/cppdocs/installing.html)
5656
4. [Conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/download.html)
5757

cmake/check_files.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
function(check_files BASE_DIR FILES_TO_CHECK FILE_MD5S MISSING_FILES)
44
foreach(FILE_TO_CHECK ${${FILES_TO_CHECK}})

cmake/copy_torch_dlls.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
function(copy_torch_dlls TARGET_NAME)
44
# According to https://github.com/pytorch/pytorch/issues/25457

cmake/cpplint.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
find_program(CPPLINT cpplint)
44

cmake/create_torch_dll_hardlinks.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
file(GLOB TORCH_DLLS "${TORCH_INSTALL_PREFIX}/lib/*.dll")
44

cmake/fetch_cifar10.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
function(fetch_cifar10 DATA_DIR)
44
set(CIFAR_DIR "${DATA_DIR}/cifar10")

cmake/fetch_datasets.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
include(${CMAKE_CURRENT_LIST_DIR}/fetch_mnist.cmake)
44
include(${CMAKE_CURRENT_LIST_DIR}/fetch_cifar10.cmake)

cmake/fetch_flickr8k.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
function(fetch_flickr8k DATA_DIR)
44
set(FLICKR8K_DIR "${DATA_DIR}/flickr_8k")

cmake/fetch_imagenette.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
function(fetch_imagenette DATA_DIR)
44
set(IMAGENETTE_DIR "${DATA_DIR}/imagenette2-160")

cmake/fetch_libtorch.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
include(FetchContent)
44

cmake/fetch_mnist.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
function(fetch_mnist DATA_DIR)
44
set(MNIST_DOWNLOAD_DIR "${DATA_DIR}/mnist/download")

cmake/fetch_neural_style_transfer_images.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
function(fetch_neural_style_transfer_imagers DATA_DIR)
44
set(NEURAL_STYLE_TRANSFER_IMAGES_DIR

cmake/fetch_penntreebank.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
function(fetch_penntreebank DATA_DIR)
44
set(PENNTREEBANK_DIR "${DATA_DIR}/penntreebank")

cmake/find_gz_extractor.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
# Find program that can extract .gz files.
44
# Based on: https://github.com/Amber-MD/cmake-buildscripts/blob/master/gzip.cmake

extern/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
project(extern VERSION 1.0.0 LANGUAGES CXX)
44

notebooks/pytorch_cpp_colab_notebook.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,9 @@
162162
"!rm -rf deps\n",
163163
"!mkdir deps\n",
164164
"%cd /content/deps\n",
165-
"!wget --no-check-certificate https://www.cmake.org/files/v3.14/cmake-3.14.0-Linux-x86_64.tar.gz\n",
166-
"!tar -xvf cmake-3.14.0-Linux-x86_64.tar.gz > /dev/null\n",
167-
"%mv cmake-3.14.0-Linux-x86_64 cmake-install\n",
165+
"!wget --no-check-certificate https://www.cmake.org/files/v3.19/cmake-3.19.0-Linux-x86_64.tar.gz\n",
166+
"!tar -xvf cmake-3.19.0-Linux-x86_64.tar.gz > /dev/null\n",
167+
"%mv cmake-3.19.0-Linux-x86_64 cmake-install\n",
168168
"old_path = %env PATH\n",
169169
"new_path = \"/content/deps/cmake-install:/content/deps/cmake-install/bin:\" + old_path\n",
170170
"%env PATH={new_path}\n",

tutorials/advanced/generative_adversarial_network/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
project(generative-adversarial-network VERSION 1.0.0 LANGUAGES CXX)
44

tutorials/advanced/image_captioning/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
project(image-captioning VERSION 1.0.0 LANGUAGES CXX)
44

tutorials/advanced/neural_style_transfer/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
project(neural-style-transfer VERSION 1.0.0 LANGUAGES CXX)
44

tutorials/advanced/variational_autoencoder/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
project(variational-autoencoder VERSION 1.0.0 LANGUAGES CXX)
44

tutorials/basics/feedforward_neural_network/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
project(feedforward-neural-network VERSION 1.0.0 LANGUAGES CXX)
44

tutorials/basics/linear_regression/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
project(linear-regression VERSION 1.0.0 LANGUAGES CXX)
44

tutorials/basics/logistic_regression/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
project(logistic-regression VERSION 1.0.0 LANGUAGES CXX)
44

tutorials/basics/pytorch_basics/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
project(pytorch-basics VERSION 1.0.0 LANGUAGES CXX)
44

tutorials/intermediate/bidirectional_recurrent_neural_network/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
project(bidirectional-recurrent-neural-network VERSION 1.0.0 LANGUAGES CXX)
44

tutorials/intermediate/convolutional_neural_network/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
project(convolutional-neural-network VERSION 1.0.0 LANGUAGES CXX)
44

tutorials/intermediate/deep_residual_network/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
project(deep-residual-network VERSION 1.0.0 LANGUAGES CXX)
44

tutorials/intermediate/language_model/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
project(language-model VERSION 1.0.0 LANGUAGES CXX)
44

tutorials/intermediate/recurrent_neural_network/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
project(recurrent-neural-network VERSION 1.0.0 LANGUAGES CXX)
44

tutorials/popular/blitz/autograd/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
project(autograd VERSION 1.0.0 LANGUAGES CXX)
44

tutorials/popular/blitz/neural_networks/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
project(neural-networks VERSION 1.0.0 LANGUAGES CXX)
44

tutorials/popular/blitz/tensors/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
project(tensors VERSION 1.0.0 LANGUAGES CXX)
44

tutorials/popular/blitz/training_a_classifier/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
project(training-a-classifier VERSION 1.0.0 LANGUAGES CXX)
44

utils/image_io/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
22

33
project(image-io VERSION 1.0.0 LANGUAGES CXX)
44

0 commit comments

Comments
 (0)