https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a5c5ba17e5d2298adc280…
commit a5c5ba17e5d2298adc280455a7fcf62e6c963f55
Author: Oleksandr Shaposhnikov <sanchaez(a)reactos.org>
AuthorDate: Mon Feb 4 04:53:09 2019 +0200
Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org>
CommitDate: Sun Feb 10 00:25:04 2019 +0100
[FREELDR] Fix VSSolution configuring and build
"configure.cmd VSSolution" was failing due to add_asm_files macro
expansion. It was using the same 'freeldr_linker_file' variable name
as a temporary filename base twice. This patch uses '_target'
parameter to make those variable names differ.
---
boot/freeldr/freeldr/CMakeLists.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/boot/freeldr/freeldr/CMakeLists.txt b/boot/freeldr/freeldr/CMakeLists.txt
index 5d0bba0ba9..6fb59604c2 100644
--- a/boot/freeldr/freeldr/CMakeLists.txt
+++ b/boot/freeldr/freeldr/CMakeLists.txt
@@ -34,7 +34,7 @@ function(add_linker_script _target _linker_script_file)
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${_file_full_path}" "${_generated_file}"
DEPENDS ${_file_full_path})
set_source_files_properties(${_generated_file} PROPERTIES LANGUAGE "ASM"
GENERATED TRUE)
- add_asm_files(freeldr_linker_file ${_generated_file})
+ add_asm_files(${_target}_freeldr_linker_file ${_generated_file})
# Generate the C module containing extra sections specifications and layout,
# as well as comment-type linker #pragma directives.
@@ -44,10 +44,10 @@ function(add_linker_script _target _linker_script_file)
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"${_file_full_path}" "${_generated_file}"
DEPENDS ${_file_full_path})
set_source_files_properties(${_generated_file} PROPERTIES LANGUAGE "C"
GENERATED TRUE)
- list(APPEND freeldr_linker_file ${_generated_file})
+ list(APPEND ${_target}_freeldr_linker_file ${_generated_file})
# Add both files to the sources of the target.
- target_sources(${_target} PRIVATE ${freeldr_linker_file})
+ target_sources(${_target} PRIVATE "${${_target}_freeldr_linker_file}")
# Create the additional linker response file.
set(_generated_file "${_generated_file_path_prefix}.rsp")