https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9e6f3ef12b07fe0ddfcf6…
commit 9e6f3ef12b07fe0ddfcf6618b7aacb7089bd83e3
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Mon Apr 2 09:57:51 2018 +0200
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Mon Apr 2 10:07:38 2018 +0200
[CMAKE] Avoid generator expresisons in install()'s RENAME argument. CORE-14509
This fixes rostests_install, and thus hopefully WHS-Testbot.
---
sdk/cmake/CMakeMacros.cmake | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/sdk/cmake/CMakeMacros.cmake b/sdk/cmake/CMakeMacros.cmake
index c2b3f37da0..020ccc47ad 100644
--- a/sdk/cmake/CMakeMacros.cmake
+++ b/sdk/cmake/CMakeMacros.cmake
@@ -855,14 +855,15 @@ function(add_rostests_file)
message(FATAL_ERROR "You must provide a target or a file to install!")
endif()
+ set(_ROSTESTS_NAME_ON_CD "${_ROSTESTS_RENAME}")
if(NOT _ROSTESTS_FILE)
set(_ROSTESTS_FILE "$<TARGET_FILE:${_ROSTESTS_TARGET}>")
if(NOT _ROSTESTS_RENAME)
- set(_ROSTESTS_RENAME
"$<TARGET_FILE_NAME:${_ROSTESTS_TARGET}>")
+ set(_ROSTESTS_NAME_ON_CD
"$<TARGET_FILE_NAME:${_ROSTESTS_TARGET}>")
endif()
else()
if(NOT _ROSTESTS_RENAME)
- get_filename_component(_ROSTESTS_RENAME ${_ROSTESTS_FILE} NAME)
+ get_filename_component(_ROSTESTS_NAME_ON_CD ${_ROSTESTS_FILE} NAME)
endif()
endif()
@@ -871,12 +872,16 @@ function(add_rostests_file)
endif()
if(_ROSTESTS_TARGET)
- add_cd_file(TARGET ${_ROSTESTS_TARGET} FILE ${_ROSTESTS_FILE} DESTINATION
"reactos/bin${_ROSTESTS_SUBDIR}" NAME_ON_CD ${_ROSTESTS_RENAME} FOR all)
+ add_cd_file(TARGET ${_ROSTESTS_TARGET} FILE ${_ROSTESTS_FILE} DESTINATION
"reactos/bin${_ROSTESTS_SUBDIR}" NAME_ON_CD ${_ROSTESTS_NAME_ON_CD} FOR all)
else()
- add_cd_file(FILE ${_ROSTESTS_FILE} DESTINATION
"reactos/bin${_ROSTESTS_SUBDIR}" NAME_ON_CD ${_ROSTESTS_RENAME} FOR all)
+ add_cd_file(FILE ${_ROSTESTS_FILE} DESTINATION
"reactos/bin${_ROSTESTS_SUBDIR}" NAME_ON_CD ${_ROSTESTS_NAME_ON_CD} FOR all)
endif()
if(DEFINED ENV{ROSTESTS_INSTALL})
- install(FILES ${_ROSTESTS_FILE} DESTINATION
"$ENV{ROSTESTS_INSTALL}${_ROSTESTS_SUBDIR}" COMPONENT rostests RENAME
${_ROSTESTS_RENAME})
+ if(_ROSTESTS_RENAME)
+ install(FILES ${_ROSTESTS_FILE} DESTINATION
"$ENV{ROSTESTS_INSTALL}${_ROSTESTS_SUBDIR}" COMPONENT rostests RENAME
${_ROSTESTS_RENAME})
+ else()
+ install(FILES ${_ROSTESTS_FILE} DESTINATION
"$ENV{ROSTESTS_INSTALL}${_ROSTESTS_SUBDIR}" COMPONENT rostests)
+ endif()
endif()
endfunction()