diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2020-05-05 13:44:54 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2020-05-12 14:34:23 (GMT) |
commit | 0199dd9f1b48b47ae63547ffe737ea9169caf511 (patch) | |
tree | a7a7c504915a027a699a92b098a553fd2e554a64 /Tests/RunCMake/BuildDepends/ExternalProjectCacheArgs.cmake | |
parent | 615129f3ebd308abeaaee7f5f0689e7fc4616c28 (diff) | |
download | CMake-0199dd9f1b48b47ae63547ffe737ea9169caf511.zip CMake-0199dd9f1b48b47ae63547ffe737ea9169caf511.tar.gz CMake-0199dd9f1b48b47ae63547ffe737ea9169caf511.tar.bz2 |
ExternalProject: expose _ep_cache_args_script to the caller
This is needed so that the caller can add a dependency on the cache
file.
Fixes: #20668
Diffstat (limited to 'Tests/RunCMake/BuildDepends/ExternalProjectCacheArgs.cmake')
-rw-r--r-- | Tests/RunCMake/BuildDepends/ExternalProjectCacheArgs.cmake | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Tests/RunCMake/BuildDepends/ExternalProjectCacheArgs.cmake b/Tests/RunCMake/BuildDepends/ExternalProjectCacheArgs.cmake new file mode 100644 index 0000000..fe69426 --- /dev/null +++ b/Tests/RunCMake/BuildDepends/ExternalProjectCacheArgs.cmake @@ -0,0 +1,19 @@ +include("${CMAKE_CURRENT_BINARY_DIR}/data.cmake") + +include(ExternalProject) +ExternalProject_add(external + SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/ExternalProject" + CMAKE_CACHE_ARGS + ${cache_args} + BUILD_COMMAND "" + INSTALL_COMMAND "") + +set(cache_args_path "<TMP_DIR>/external-cache-$<CONFIG>.cmake") +set(cmake_cache_path "<BINARY_DIR>/CMakeCache.txt") +_ep_replace_location_tags(external cache_args_path cmake_cache_path) + +file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/check-$<LOWER_CASE:$<CONFIG>>.cmake" CONTENT " +set(check_pairs + \"${cmake_cache_path}|${cache_args_path}\" +) +") |