Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
c07694ba
Unverified
Commit
c07694ba
authored
May 29, 2024
by
James Lamb
Committed by
GitHub
May 29, 2024
Browse files
[cmake] always target Windows SDK v10.x when using Visual Studio generators (fixes #6448) (#6451)
parent
dee8a188
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
CMakeLists.txt
CMakeLists.txt
+8
-0
No files found.
CMakeLists.txt
View file @
c07694ba
...
@@ -25,6 +25,14 @@ option(__INTEGRATE_OPENCL "Set to ON if building LightGBM with the OpenCL ICD Lo
...
@@ -25,6 +25,14 @@ option(__INTEGRATE_OPENCL "Set to ON if building LightGBM with the OpenCL ICD Lo
cmake_minimum_required
(
VERSION 3.18
)
cmake_minimum_required
(
VERSION 3.18
)
# If using Visual Studio generators, always target v10.x of the Windows SDK.
# Doing this avoids lookups that could fall back to very old versions, e.g. by finding
# outdated registry entries.
# ref: https://cmake.org/cmake/help/latest/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.html
if
(
CMAKE_GENERATOR MATCHES
"Visual Studio"
)
set
(
CMAKE_SYSTEM_VERSION 10.0 CACHE INTERNAL
"target Windows SDK version"
FORCE
)
endif
()
project
(
lightgbm LANGUAGES C CXX
)
project
(
lightgbm LANGUAGES C CXX
)
if
(
BUILD_CPP_TEST
)
if
(
BUILD_CPP_TEST
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment