From 88771c71250ceb0557b572bba2a13ea1a599bf99 Mon Sep 17 00:00:00 2001 From: Mohamadreza Nakhleh Date: Fri, 13 Oct 2023 05:12:47 +0330 Subject: [PATCH 1/8] (chore) set min version of cmake in native CmakeLists.txt to surpass policy CMP0000 of Cmake --- src/native/libs/System.Globalization.Native/CMakeLists.txt | 2 ++ src/native/libs/System.IO.Compression.Native/CMakeLists.txt | 2 ++ src/native/libs/System.IO.Ports.Native/CMakeLists.txt | 2 ++ src/native/libs/System.Native/CMakeLists.txt | 2 ++ src/native/libs/System.Net.Security.Native/CMakeLists.txt | 2 ++ .../System.Security.Cryptography.Native.Android/CMakeLists.txt | 2 ++ .../System.Security.Cryptography.Native.Apple/CMakeLists.txt | 2 ++ .../libs/System.Security.Cryptography.Native/CMakeLists.txt | 2 ++ 8 files changed, 16 insertions(+) diff --git a/src/native/libs/System.Globalization.Native/CMakeLists.txt b/src/native/libs/System.Globalization.Native/CMakeLists.txt index 25f91b4cfab08..9555c7140a4d5 100644 --- a/src/native/libs/System.Globalization.Native/CMakeLists.txt +++ b/src/native/libs/System.Globalization.Native/CMakeLists.txt @@ -1,3 +1,5 @@ +cmake_minimum_required(VERSION 2.6.0) + project(System.Globalization.Native C) if(CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_WASI) diff --git a/src/native/libs/System.IO.Compression.Native/CMakeLists.txt b/src/native/libs/System.IO.Compression.Native/CMakeLists.txt index 0a05e96eb494b..12626d065bba5 100644 --- a/src/native/libs/System.IO.Compression.Native/CMakeLists.txt +++ b/src/native/libs/System.IO.Compression.Native/CMakeLists.txt @@ -1,3 +1,5 @@ +cmake_minimum_required(VERSION 2.6.0) + project(System.IO.Compression.Native C) include(${CMAKE_CURRENT_LIST_DIR}/extra_libs.cmake) diff --git a/src/native/libs/System.IO.Ports.Native/CMakeLists.txt b/src/native/libs/System.IO.Ports.Native/CMakeLists.txt index 8c548a548273a..283563450d112 100644 --- a/src/native/libs/System.IO.Ports.Native/CMakeLists.txt +++ b/src/native/libs/System.IO.Ports.Native/CMakeLists.txt @@ -1,3 +1,5 @@ +cmake_minimum_required(VERSION 2.6.0) + project(System.IO.Ports.Native C) set(PORTS_SOURCES diff --git a/src/native/libs/System.Native/CMakeLists.txt b/src/native/libs/System.Native/CMakeLists.txt index 4cac1051f6739..a521b75c2b94d 100644 --- a/src/native/libs/System.Native/CMakeLists.txt +++ b/src/native/libs/System.Native/CMakeLists.txt @@ -1,3 +1,5 @@ +cmake_minimum_required(VERSION 2.6.0) + project(System.Native C) if (NOT CLR_CMAKE_TARGET_MACCATALYST AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS AND NOT CLR_CMAKE_TARGET_WASI) diff --git a/src/native/libs/System.Net.Security.Native/CMakeLists.txt b/src/native/libs/System.Net.Security.Native/CMakeLists.txt index b0e02f41509b5..11fb3cf08e39e 100644 --- a/src/native/libs/System.Net.Security.Native/CMakeLists.txt +++ b/src/native/libs/System.Net.Security.Native/CMakeLists.txt @@ -1,3 +1,5 @@ +cmake_minimum_required(VERSION 2.6.0) + project(System.Net.Security.Native C) add_compile_options(-Wno-incompatible-pointer-types-discards-qualifiers) diff --git a/src/native/libs/System.Security.Cryptography.Native.Android/CMakeLists.txt b/src/native/libs/System.Security.Cryptography.Native.Android/CMakeLists.txt index 76c93faf093f0..c843bbe61b52d 100644 --- a/src/native/libs/System.Security.Cryptography.Native.Android/CMakeLists.txt +++ b/src/native/libs/System.Security.Cryptography.Native.Android/CMakeLists.txt @@ -1,3 +1,5 @@ +cmake_minimum_required(VERSION 2.6.0) + project(System.Security.Cryptography.Native.Android C) add_compile_options(-Wno-gnu-zero-variadic-macro-arguments) diff --git a/src/native/libs/System.Security.Cryptography.Native.Apple/CMakeLists.txt b/src/native/libs/System.Security.Cryptography.Native.Apple/CMakeLists.txt index b847f5c3cd68b..a71c0534911a4 100644 --- a/src/native/libs/System.Security.Cryptography.Native.Apple/CMakeLists.txt +++ b/src/native/libs/System.Security.Cryptography.Native.Apple/CMakeLists.txt @@ -1,3 +1,5 @@ +cmake_minimum_required(VERSION 3.20) + project(System.Security.Cryptography.Native.Apple C) include(${CMAKE_CURRENT_LIST_DIR}/extra_libs.cmake) diff --git a/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt b/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt index f99016281ab39..4239eaf3a18ce 100644 --- a/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt +++ b/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt @@ -1,3 +1,5 @@ +cmake_minimum_required(VERSION 2.6.0) + project(System.Security.Cryptography.Native C) # These are happening inside of OpenSSL-defined macros out of our control From 897660ba5cadc99ca15ae1a773de130db1263634 Mon Sep 17 00:00:00 2001 From: Mohamadreza Nakhleh Date: Fri, 13 Oct 2023 05:19:45 +0330 Subject: [PATCH 2/8] (chore) set all cmake versions according to native/libs/CMakeLists.txt --- src/native/libs/System.Globalization.Native/CMakeLists.txt | 2 +- src/native/libs/System.IO.Compression.Native/CMakeLists.txt | 2 +- src/native/libs/System.IO.Ports.Native/CMakeLists.txt | 2 +- src/native/libs/System.Native/CMakeLists.txt | 2 +- src/native/libs/System.Net.Security.Native/CMakeLists.txt | 2 +- .../System.Security.Cryptography.Native.Android/CMakeLists.txt | 2 +- .../libs/System.Security.Cryptography.Native/CMakeLists.txt | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/native/libs/System.Globalization.Native/CMakeLists.txt b/src/native/libs/System.Globalization.Native/CMakeLists.txt index 9555c7140a4d5..90cdc4b7c7f7d 100644 --- a/src/native/libs/System.Globalization.Native/CMakeLists.txt +++ b/src/native/libs/System.Globalization.Native/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.6.0) +cmake_minimum_required(VERSION 3.20) project(System.Globalization.Native C) diff --git a/src/native/libs/System.IO.Compression.Native/CMakeLists.txt b/src/native/libs/System.IO.Compression.Native/CMakeLists.txt index 12626d065bba5..0cee347ecd154 100644 --- a/src/native/libs/System.IO.Compression.Native/CMakeLists.txt +++ b/src/native/libs/System.IO.Compression.Native/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.6.0) +cmake_minimum_required(VERSION 3.20) project(System.IO.Compression.Native C) diff --git a/src/native/libs/System.IO.Ports.Native/CMakeLists.txt b/src/native/libs/System.IO.Ports.Native/CMakeLists.txt index 283563450d112..f7d25c078cfeb 100644 --- a/src/native/libs/System.IO.Ports.Native/CMakeLists.txt +++ b/src/native/libs/System.IO.Ports.Native/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.6.0) +cmake_minimum_required(VERSION 3.20) project(System.IO.Ports.Native C) diff --git a/src/native/libs/System.Native/CMakeLists.txt b/src/native/libs/System.Native/CMakeLists.txt index a521b75c2b94d..8947902e497c2 100644 --- a/src/native/libs/System.Native/CMakeLists.txt +++ b/src/native/libs/System.Native/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.6.0) +cmake_minimum_required(VERSION 3.20) project(System.Native C) diff --git a/src/native/libs/System.Net.Security.Native/CMakeLists.txt b/src/native/libs/System.Net.Security.Native/CMakeLists.txt index 11fb3cf08e39e..7ac5b8cdce07c 100644 --- a/src/native/libs/System.Net.Security.Native/CMakeLists.txt +++ b/src/native/libs/System.Net.Security.Native/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.6.0) +cmake_minimum_required(VERSION 3.20) project(System.Net.Security.Native C) diff --git a/src/native/libs/System.Security.Cryptography.Native.Android/CMakeLists.txt b/src/native/libs/System.Security.Cryptography.Native.Android/CMakeLists.txt index c843bbe61b52d..ee9f2bf4767f5 100644 --- a/src/native/libs/System.Security.Cryptography.Native.Android/CMakeLists.txt +++ b/src/native/libs/System.Security.Cryptography.Native.Android/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.6.0) +cmake_minimum_required(VERSION 3.20) project(System.Security.Cryptography.Native.Android C) diff --git a/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt b/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt index 4239eaf3a18ce..c18221bd68423 100644 --- a/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt +++ b/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.6.0) +cmake_minimum_required(VERSION 3.20) project(System.Security.Cryptography.Native C) From b70c99ef9776a5cc18c326f36ab83c647eb35157 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Fri, 13 Oct 2023 05:29:16 -0700 Subject: [PATCH 3/8] Apply suggestions from code review --- src/native/libs/System.Globalization.Native/CMakeLists.txt | 1 + src/native/libs/System.IO.Compression.Native/CMakeLists.txt | 2 -- src/native/libs/System.IO.Ports.Native/CMakeLists.txt | 2 -- src/native/libs/System.Native/CMakeLists.txt | 2 -- src/native/libs/System.Net.Security.Native/CMakeLists.txt | 2 -- .../System.Security.Cryptography.Native.Android/CMakeLists.txt | 2 -- .../System.Security.Cryptography.Native.Apple/CMakeLists.txt | 2 -- 7 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/native/libs/System.Globalization.Native/CMakeLists.txt b/src/native/libs/System.Globalization.Native/CMakeLists.txt index 90cdc4b7c7f7d..fec3b4dc05c95 100644 --- a/src/native/libs/System.Globalization.Native/CMakeLists.txt +++ b/src/native/libs/System.Globalization.Native/CMakeLists.txt @@ -1,3 +1,4 @@ +# Required for StaticICULinking cmake_minimum_required(VERSION 3.20) project(System.Globalization.Native C) diff --git a/src/native/libs/System.IO.Compression.Native/CMakeLists.txt b/src/native/libs/System.IO.Compression.Native/CMakeLists.txt index 0cee347ecd154..0a05e96eb494b 100644 --- a/src/native/libs/System.IO.Compression.Native/CMakeLists.txt +++ b/src/native/libs/System.IO.Compression.Native/CMakeLists.txt @@ -1,5 +1,3 @@ -cmake_minimum_required(VERSION 3.20) - project(System.IO.Compression.Native C) include(${CMAKE_CURRENT_LIST_DIR}/extra_libs.cmake) diff --git a/src/native/libs/System.IO.Ports.Native/CMakeLists.txt b/src/native/libs/System.IO.Ports.Native/CMakeLists.txt index f7d25c078cfeb..8c548a548273a 100644 --- a/src/native/libs/System.IO.Ports.Native/CMakeLists.txt +++ b/src/native/libs/System.IO.Ports.Native/CMakeLists.txt @@ -1,5 +1,3 @@ -cmake_minimum_required(VERSION 3.20) - project(System.IO.Ports.Native C) set(PORTS_SOURCES diff --git a/src/native/libs/System.Native/CMakeLists.txt b/src/native/libs/System.Native/CMakeLists.txt index 8947902e497c2..4cac1051f6739 100644 --- a/src/native/libs/System.Native/CMakeLists.txt +++ b/src/native/libs/System.Native/CMakeLists.txt @@ -1,5 +1,3 @@ -cmake_minimum_required(VERSION 3.20) - project(System.Native C) if (NOT CLR_CMAKE_TARGET_MACCATALYST AND NOT CLR_CMAKE_TARGET_IOS AND NOT CLR_CMAKE_TARGET_TVOS AND NOT CLR_CMAKE_TARGET_WASI) diff --git a/src/native/libs/System.Net.Security.Native/CMakeLists.txt b/src/native/libs/System.Net.Security.Native/CMakeLists.txt index 7ac5b8cdce07c..b0e02f41509b5 100644 --- a/src/native/libs/System.Net.Security.Native/CMakeLists.txt +++ b/src/native/libs/System.Net.Security.Native/CMakeLists.txt @@ -1,5 +1,3 @@ -cmake_minimum_required(VERSION 3.20) - project(System.Net.Security.Native C) add_compile_options(-Wno-incompatible-pointer-types-discards-qualifiers) diff --git a/src/native/libs/System.Security.Cryptography.Native.Android/CMakeLists.txt b/src/native/libs/System.Security.Cryptography.Native.Android/CMakeLists.txt index ee9f2bf4767f5..76c93faf093f0 100644 --- a/src/native/libs/System.Security.Cryptography.Native.Android/CMakeLists.txt +++ b/src/native/libs/System.Security.Cryptography.Native.Android/CMakeLists.txt @@ -1,5 +1,3 @@ -cmake_minimum_required(VERSION 3.20) - project(System.Security.Cryptography.Native.Android C) add_compile_options(-Wno-gnu-zero-variadic-macro-arguments) diff --git a/src/native/libs/System.Security.Cryptography.Native.Apple/CMakeLists.txt b/src/native/libs/System.Security.Cryptography.Native.Apple/CMakeLists.txt index a71c0534911a4..b847f5c3cd68b 100644 --- a/src/native/libs/System.Security.Cryptography.Native.Apple/CMakeLists.txt +++ b/src/native/libs/System.Security.Cryptography.Native.Apple/CMakeLists.txt @@ -1,5 +1,3 @@ -cmake_minimum_required(VERSION 3.20) - project(System.Security.Cryptography.Native.Apple C) include(${CMAKE_CURRENT_LIST_DIR}/extra_libs.cmake) From 41c0f68c5905ee45d177ce7c8c874791ef9fa58b Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Fri, 13 Oct 2023 05:29:28 -0700 Subject: [PATCH 4/8] Update src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt --- .../libs/System.Security.Cryptography.Native/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt b/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt index c18221bd68423..c9424b17e525b 100644 --- a/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt +++ b/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt @@ -1,3 +1,4 @@ +# Required for StaticOpenSslLinking cmake_minimum_required(VERSION 3.20) project(System.Security.Cryptography.Native C) From a8bcbaed575b784fcae813225251087257eb1a28 Mon Sep 17 00:00:00 2001 From: Mohamadreza Nakhleh Date: Fri, 13 Oct 2023 20:31:28 +0330 Subject: [PATCH 5/8] Update src/native/libs/System.Globalization.Native/CMakeLists.txt hange the minimum version to 3.16 to be consistent with other CMake scripts for System.Globalization.Native/CMakeLists.txt Co-authored-by: Jeremy Koritzinsky --- src/native/libs/System.Globalization.Native/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/native/libs/System.Globalization.Native/CMakeLists.txt b/src/native/libs/System.Globalization.Native/CMakeLists.txt index fec3b4dc05c95..2b98defc9d23c 100644 --- a/src/native/libs/System.Globalization.Native/CMakeLists.txt +++ b/src/native/libs/System.Globalization.Native/CMakeLists.txt @@ -1,5 +1,5 @@ # Required for StaticICULinking -cmake_minimum_required(VERSION 3.20) +cmake_minimum_required(VERSION 3.16...3.20) project(System.Globalization.Native C) From 0f7a6eca0120067c9fb2a2e5fb618c0731ff374b Mon Sep 17 00:00:00 2001 From: Mohamadreza Nakhleh Date: Fri, 13 Oct 2023 20:32:07 +0330 Subject: [PATCH 6/8] Update src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt change the minimum version to 3.16 to be consistent with other CMake scripts for System.Globalization.Native/CMakeLists.txt Co-authored-by: Jeremy Koritzinsky --- .../libs/System.Security.Cryptography.Native/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt b/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt index c9424b17e525b..b4901e37898fd 100644 --- a/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt +++ b/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt @@ -1,5 +1,5 @@ # Required for StaticOpenSslLinking -cmake_minimum_required(VERSION 3.20) +cmake_minimum_required(VERSION 3.16...3.20) project(System.Security.Cryptography.Native C) From 47efbe41d07d0ed8d1d8b28fb02dd6768e2607c7 Mon Sep 17 00:00:00 2001 From: Mohamadreza Nakhleh Date: Fri, 13 Oct 2023 20:40:49 +0330 Subject: [PATCH 7/8] (chore) set min version for cmake to 3.16 --- src/native/libs/System.Globalization.Native/CMakeLists.txt | 2 +- .../libs/System.Security.Cryptography.Native/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/native/libs/System.Globalization.Native/CMakeLists.txt b/src/native/libs/System.Globalization.Native/CMakeLists.txt index 2b98defc9d23c..2931986727e68 100644 --- a/src/native/libs/System.Globalization.Native/CMakeLists.txt +++ b/src/native/libs/System.Globalization.Native/CMakeLists.txt @@ -1,5 +1,5 @@ # Required for StaticICULinking -cmake_minimum_required(VERSION 3.16...3.20) +cmake_minimum_required(VERSION 3.16) project(System.Globalization.Native C) diff --git a/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt b/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt index b4901e37898fd..dd82020cc324b 100644 --- a/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt +++ b/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt @@ -1,5 +1,5 @@ # Required for StaticOpenSslLinking -cmake_minimum_required(VERSION 3.16...3.20) +cmake_minimum_required(VERSION 3.16) project(System.Security.Cryptography.Native C) From 2872c7af26697e6533e6b1c14118cde2416f48b1 Mon Sep 17 00:00:00 2001 From: Mohamadreza Nakhleh Date: Sat, 14 Oct 2023 14:56:09 +0330 Subject: [PATCH 8/8] (chore) set min cmae version to 3.10 --- src/native/libs/System.Globalization.Native/CMakeLists.txt | 2 +- .../libs/System.Security.Cryptography.Native/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/native/libs/System.Globalization.Native/CMakeLists.txt b/src/native/libs/System.Globalization.Native/CMakeLists.txt index 2931986727e68..d8b3335ae3be7 100644 --- a/src/native/libs/System.Globalization.Native/CMakeLists.txt +++ b/src/native/libs/System.Globalization.Native/CMakeLists.txt @@ -1,5 +1,5 @@ # Required for StaticICULinking -cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION 3.10..3.20) project(System.Globalization.Native C) diff --git a/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt b/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt index dd82020cc324b..52213b1a2d247 100644 --- a/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt +++ b/src/native/libs/System.Security.Cryptography.Native/CMakeLists.txt @@ -1,5 +1,5 @@ # Required for StaticOpenSslLinking -cmake_minimum_required(VERSION 3.16) +cmake_minimum_required(VERSION 3.10..3.20) project(System.Security.Cryptography.Native C)