[llvm-bugs] [Bug 44311] New: configure_file in clang/test/CMakeLists.txt doesn't work with VisualStudio

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Dec 16 03:23:06 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=44311

            Bug ID: 44311
           Summary: configure_file in clang/test/CMakeLists.txt doesn't
                    work with VisualStudio
           Product: Build scripts
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: cmake
          Assignee: unassignedbugs at nondot.org
          Reporter: yurybura at gmail.com
                CC: llvm-bugs at lists.llvm.org

This code doesn't work with Visual Studio:

configure_file(AST/gen_ast_dump_json_test.py
${LLVM_TOOLS_BINARY_DIR}/gen_ast_dump_json_test.py COPYONLY)

because LLVM_TOOLS_BINARY_DIR for VS generator looks like
"[...]/build/$(Configuration)/bin"


Issue was added in the commit:

Revision: d09e811cb4da3fab554f8a189a79f9ac74cb8d0d
Author: Alex Richardson <Alexander.Richardson at cl.cam.ac.uk>
Date: 12.11.2019 14:47:54
Message:
[gen_ast_dump_json_test.py] Copy to binary directory to omit --clang argument

To fix this issue copy this file during build. For example:

add_custom_target(copy-gen-ast-dump-json-test
  COMMAND ${CMAKE_COMMAND} -E copy
          ${CMAKE_CURRENT_SOURCE_DIR}/AST/gen_ast_dump_json_test.py
          ${LLVM_TOOLS_BINARY_DIR}/gen_ast_dump_json_test.py
  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/AST/gen_ast_dump_json_test.py
)
set_target_properties(copy-gen-ast-dump-json-test PROPERTIES FOLDER "Clang
tests")

list(APPEND CLANG_TEST_DEPS
  copy-gen-ast-dump-json-test
)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191216/4028a577/attachment-0001.html>


More information about the llvm-bugs mailing list