Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cmake] upgrade to 3.18 #12612

Merged
merged 34 commits into from
Oct 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
8ac7bc3
[cmake] upgrade to 3.18
cenit Jul 28, 2020
9c37fe1
Merge branch 'master' into dev/cenit/cmake318
cenit Jul 31, 2020
88846d6
Merge branch 'master' into dev/cenit/cmake318
cenit Aug 6, 2020
45363b8
Merge branch 'master' into dev/cenit/cmake318
cenit Aug 24, 2020
38f6ecb
[cmake] update to 3.18.2
cenit Aug 24, 2020
efdc0aa
[VMSS] install libtool-bin instead of libtool
Aug 26, 2020
04d0c04
[VMSS] install gettext using brew to get autopoint
Aug 26, 2020
88b71fc
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
Aug 26, 2020
5579df3
[VMSS] Re-add tool libtool
Aug 27, 2020
5bc29d6
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
Aug 27, 2020
18826d3
[vcpkg_configure_make]Fix find libtool
Aug 27, 2020
485abcb
Merge remote-tracking branch 'origin/master' into pr/cenit/12612
BillyONeal Aug 27, 2020
51b4c9b
Remove wrong cmake REQUIRED keywords
cenit Aug 27, 2020
c5a6bdd
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
Aug 28, 2020
4031721
Revert 18826d3023334349beb2edb657fea4704f18ae15
Aug 31, 2020
61676b0
Merge branch 'master' into dev/cenit/cmake318
JackBoosY Sep 1, 2020
a11b055
[sentry-native] Don't try to turn on C11 mode on Windows.
BillyONeal Sep 4, 2020
bd4fa34
Merge remote-tracking branch 'origin/master' into HEAD
BillyONeal Sep 7, 2020
f5b56b3
[plplot] Fix check pkgconfig
Sep 9, 2020
9099ad6
Merge branch 'master' into dev/cenit/cmake318
JackBoosY Sep 23, 2020
4e9597c
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
Sep 24, 2020
4656638
merge with master
cenit Sep 27, 2020
4de6ee7
revert unnecessary changes to vcpkg_configure_gn.cmake
cenit Sep 27, 2020
82919ac
[folly] Suitable for cmake 3.18
Oct 12, 2020
7691f5f
Revert unnecessary change to provision-image.sh.
BillyONeal Oct 13, 2020
6dd7579
Merge remote-tracking branch 'origin/master' into dev/cenit/cmake318
BillyONeal Oct 13, 2020
38d3fec
Merge remote-tracking branch 'origin/master' into dev/cenit/cmake318
BillyONeal Oct 13, 2020
2a1c966
Revert unnecessary changes to the sentry-native port.
BillyONeal Oct 13, 2020
bfb9e2f
Merge remote-tracking branch 'origin/master' into HEAD
BillyONeal Oct 14, 2020
ab08761
[cmake] update to 3.18.4
Oct 19, 2020
ad2ed5d
update hash
Oct 19, 2020
332b59a
update hash
Oct 19, 2020
b8c9752
Merge remote-tracking branch 'origin/master' into HEAD
BillyONeal Oct 19, 2020
b2abf2c
[freetds] Baseline due to upstream being gone.
BillyONeal Oct 20, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ports/folly/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: folly
Version: 2019.10.21.00
Port-Version: 4
Port-Version: 5
Homepage: https://github.com/facebook/folly
Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows
Build-Depends: openssl, libevent, double-conversion, glog, gflags, boost-chrono, boost-context, boost-conversion, boost-crc, boost-date-time, boost-filesystem, boost-multi-index, boost-program-options, boost-regex, boost-system, boost-thread, boost-smart-ptr
Expand Down
48 changes: 48 additions & 0 deletions ports/folly/fix-cmake-3.18.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
diff --git a/CMake/GenPkgConfig.cmake b/CMake/GenPkgConfig.cmake
index f8701b4..00a1e75 100644
--- a/CMake/GenPkgConfig.cmake
+++ b/CMake/GenPkgConfig.cmake
@@ -92,7 +92,19 @@ function(gen_pkgconfig_vars)

# Set the output variables
string(REPLACE ";" " " cflags "${cflags}")
- set("${var_prefix}_CFLAGS" "${cflags}" PARENT_SCOPE)
string(REPLACE ";" " " private_libs "${private_libs}")
+
+ # Since CMake 3.18 FindThreads may include a generator expression requiring
+ # a target, which gets propagated to us through INTERFACE_COMPILE_OPTIONS.
+ # Before CMake 3.19 there's no way to solve this in a general way, so we
+ # work around the specific case. See #1414 and CMake bug #21074.
+ if(CMAKE_VERSION VERSION_LESS 3.19)
+ string(REPLACE
+ "<COMPILE_LANG_AND_ID:CUDA,NVIDIA>" "<COMPILE_LANGUAGE:CUDA>"
+ cflags "${cflags}"
+ )
+ endif()
+
+ set("${var_prefix}_CFLAGS" "${cflags}" PARENT_SCOPE)
set("${var_prefix}_PRIVATE_LIBS" "${private_libs}" PARENT_SCOPE)
endfunction()
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2de9298..950dd76 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -414,10 +414,18 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/libfolly.pc.gen
@ONLY
)
+
+# Specify target to allow resolving generator expressions requiring
+# a target for CMake >=3.19. See #1414.
+if(NOT CMAKE_VERSION VERSION_LESS 3.19)
+ set(target_arg TARGET folly_deps)
+endif()
+
file(
GENERATE
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/libfolly.pc
INPUT ${CMAKE_CURRENT_BINARY_DIR}/libfolly.pc.gen
+ ${target_arg}
)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/libfolly.pc
1 change: 1 addition & 0 deletions ports/folly/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ vcpkg_from_github(
boost-1.70.patch
fix-addbit.patch
folly_c3861.patch
fix-cmake-3.18.patch # Remove this patch on the next update
)

file(COPY
Expand Down
2 changes: 1 addition & 1 deletion ports/opencv2/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: opencv2
Version: 2.4.13.7
Port-Version: 2
Port-Version: 3
Build-Depends: zlib
Description: computer vision library, version 2
Default-Features: eigen, jpeg, opengl, png, tiff
Expand Down
2,026 changes: 0 additions & 2,026 deletions ports/opencv2/FindCUDA.cmake

This file was deleted.

1 change: 0 additions & 1 deletion ports/opencv2/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ vcpkg_from_github(

file(REMOVE "${SOURCE_PATH}/cmake/FindCUDA.cmake")
file(REMOVE_RECURSE "${SOURCE_PATH}/cmake/FindCUDA")
file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindCUDA.cmake DESTINATION ${SOURCE_PATH}/cmake/) #contains fixes for CUDA 11 compat, remove when CMake has support for it

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
"cuda" WITH_CUDA
Expand Down
1 change: 1 addition & 0 deletions ports/opencv3/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Source: opencv3
Version: 3.4.10
Port-Version: 1
Build-Depends: protobuf, zlib
Homepage: https://github.com/opencv/opencv
Description: computer vision library
Expand Down
2,026 changes: 0 additions & 2,026 deletions ports/opencv3/FindCUDA.cmake

This file was deleted.

4 changes: 0 additions & 4 deletions ports/opencv3/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ vcpkg_from_github(
)

file(REMOVE "${SOURCE_PATH}/cmake/FindCUDNN.cmake")
file(REMOVE "${SOURCE_PATH}/cmake/FindCUDA.cmake")
file(REMOVE_RECURSE "${SOURCE_PATH}/cmake/FindCUDA")
file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindCUDA.cmake DESTINATION ${SOURCE_PATH}/cmake/) # backported from CMake 3.18, remove when released

string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_WITH_STATIC_CRT)

Expand Down Expand Up @@ -252,7 +249,6 @@ vcpkg_configure_cmake(
PREFER_NINJA
SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-DOPENCV_CUDA_FORCE_BUILTIN_CMAKE_MODULE=ON #to use custom module with fixes for CUDA 11 compat, waiting for CMake support
###### ocv_options
-DOpenCV_INSTALL_BINARIES_PREFIX=
-DOPENCV_BIN_INSTALL_PATH=bin
Expand Down
Loading