mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
FetchContent: Only use @-@ replacements for sub-build CMakeLists.txt
There was a mix of ${} and @-@ substitutions in the CMakeLists.txt.in
file. It is sometimes useful to temporarily put ${} evaluations there while
working on issues, but they get replaced. Using @ONLY leaves them
untouched and uses a consistent substitution method for the whole file.
This commit is contained in:
@@ -1596,7 +1596,9 @@ set_property(GLOBAL PROPERTY _CMAKE_FindGit_GIT_EXECUTABLE_VERSION
|
|||||||
# has this set to something not findable on the PATH. We also ensured above
|
# has this set to something not findable on the PATH. We also ensured above
|
||||||
# that the Debug config will be defined for multi-config generators.
|
# that the Debug config will be defined for multi-config generators.
|
||||||
configure_file("${CMAKE_CURRENT_FUNCTION_LIST_DIR}/FetchContent/CMakeLists.cmake.in"
|
configure_file("${CMAKE_CURRENT_FUNCTION_LIST_DIR}/FetchContent/CMakeLists.cmake.in"
|
||||||
"${ARG_SUBBUILD_DIR}/CMakeLists.txt")
|
"${ARG_SUBBUILD_DIR}/CMakeLists.txt"
|
||||||
|
@ONLY
|
||||||
|
)
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND ${CMAKE_COMMAND} ${subCMakeOpts} .
|
COMMAND ${CMAKE_COMMAND} ${subCMakeOpts} .
|
||||||
RESULT_VARIABLE result
|
RESULT_VARIABLE result
|
||||||
|
|||||||
@@ -1,21 +1,21 @@
|
|||||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||||
|
|
||||||
cmake_minimum_required(VERSION ${CMAKE_VERSION})
|
cmake_minimum_required(VERSION @CMAKE_VERSION@)
|
||||||
|
|
||||||
# We name the project and the target for the ExternalProject_Add() call
|
# We name the project and the target for the ExternalProject_Add() call
|
||||||
# to something that will highlight to the user what we are working on if
|
# to something that will highlight to the user what we are working on if
|
||||||
# something goes wrong and an error message is produced.
|
# something goes wrong and an error message is produced.
|
||||||
|
|
||||||
project(${contentName}-populate NONE)
|
project(@contentName@-populate NONE)
|
||||||
|
|
||||||
@__FETCHCONTENT_CACHED_INFO@
|
@__FETCHCONTENT_CACHED_INFO@
|
||||||
|
|
||||||
include(ExternalProject)
|
include(ExternalProject)
|
||||||
ExternalProject_Add(${contentName}-populate
|
ExternalProject_Add(@contentName@-populate
|
||||||
${ARG_EXTRA}
|
@ARG_EXTRA@
|
||||||
SOURCE_DIR "${ARG_SOURCE_DIR}"
|
SOURCE_DIR "@ARG_SOURCE_DIR@"
|
||||||
BINARY_DIR "${ARG_BINARY_DIR}"
|
BINARY_DIR "@ARG_BINARY_DIR@"
|
||||||
CONFIGURE_COMMAND ""
|
CONFIGURE_COMMAND ""
|
||||||
BUILD_COMMAND ""
|
BUILD_COMMAND ""
|
||||||
INSTALL_COMMAND ""
|
INSTALL_COMMAND ""
|
||||||
|
|||||||
Reference in New Issue
Block a user