llvm.org GIT mirror llvm / 389b715
Modify the cmake build system so that if it doesn't find bison, it will use the pregenerated file in from the svn (.cvs). Work only for windows for the moment. Tested on Vista64 with MSVC2008express. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58090 91177308-0d34-0410-b5e6-96231b3b80d8 Cedric Venet 10 years ago
2 changed file(s) with 30 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
0 # tbi: Configurar ficheros.
1 configure_file(${llvm_include_path}/llvm/ADT/hash_map.h.in ${llvm_builded_incs_dir}/ADT/hash_map.h)
2 configure_file(${llvm_include_path}/llvm/ADT/hash_set.h.in ${llvm_builded_incs_dir}/ADT/hash_set.h)
3 configure_file(${llvm_include_path}/llvm/ADT/iterator.h.in ${llvm_builded_incs_dir}/ADT/iterator.h)
4 configure_file(${llvm_include_path}/llvm/Support/DataTypes.h.in ${llvm_builded_incs_dir}/Support/DataTypes.h)
5 configure_file(${llvm_include_path}/llvm/Config/config.h.in ${llvm_builded_incs_dir}/Config/config.h)
1 configure_file(${llvm_include_path}/llvm/ADT/hash_map.h.in ${llvm_builded_incs_dir}/ADT/hash_map.h COPYONLY)
2 configure_file(${llvm_include_path}/llvm/ADT/hash_set.h.in ${llvm_builded_incs_dir}/ADT/hash_set.h COPYONLY)
3 configure_file(${llvm_include_path}/llvm/ADT/iterator.h.in ${llvm_builded_incs_dir}/ADT/iterator.h COPYONLY)
4 configure_file(${llvm_include_path}/llvm/Support/DataTypes.h.in ${llvm_builded_incs_dir}/Support/DataTypes.h COPYONLY)
5 configure_file(${llvm_include_path}/llvm/Config/config.h.in ${llvm_builded_incs_dir}/Config/config.h COPYONLY)
66
77 file(READ ${llvm_include_path}/../win32/config.h vc_config_text)
88 file(APPEND ${llvm_builded_incs_dir}/Config/config.h ${vc_config_text})
0 # AsmParser, with a Bison generated parser:
11 include(FindBison)
22 find_bison()
3
4 IF(BISON_EXECUTABLE)
35 bison_generator(
46 "llvmAsm"
57 "${CMAKE_CURRENT_SOURCE_DIR}/llvmAsmParser.y"
68 "${CMAKE_CURRENT_SOURCE_DIR}/llvmAsmParser.h"
79 "${CMAKE_CURRENT_SOURCE_DIR}/llvmAsmParser.cpp"
810 )
11 ELSE(BISON_EXECUTABLE)
12 MESSAGE(STATUS "Bison not found, the pregenerated files will be used")
13
14 IF(WIN32)
15 FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} WIN_SOURCE_DIR)
16
17 ADD_CUSTOM_COMMAND(
18 OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/llvmAsmParser.cpp"
19 DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/llvmAsmParser.cpp.cvs"
20 COMMAND copy \"${WIN_SOURCE_DIR}\\llvmAsmParser.cpp.cvs\" \"${WIN_SOURCE_DIR}\\llvmAsmParser.cpp\"
21 )
22 ADD_CUSTOM_COMMAND(
23 OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/llvmAsmParser.h"
24 DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/llvmAsmParser.h.cvs"
25 COMMAND copy \"${WIN_SOURCE_DIR}\\llvmAsmParser.h.cvs\" \"${WIN_SOURCE_DIR}\\llvmAsmParser.h\"
26 )
27 ELSE(WIN32)
28 MESSAGE(SEND_ERROR "Not implemented")
29 # fixme do the same with cp instead of copy
30 ENDIF(WIN32)
31 ENDIF(BISON_EXECUTABLE)
932
1033 add_llvm_library(LLVMAsmParser
11 llvmAsmParser.cpp # Generated from llvmAsmParser.y
34 llvmAsmParser.cpp # Generated from llvmAsmParser.y or copyied from corresponding .cvs
35 llvmAsmParser.h # needed for the associated custom command to work
1236 LLLexer.cpp
1337 Parser.cpp
1438 )