llvm.org GIT mirror llvm / 980e842
CMake: Removed some cruft. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58358 91177308-0d34-0410-b5e6-96231b3b80d8 Oscar Fuentes 10 years ago
4 changed file(s) with 13 addition(s) and 21 deletion(s). Raw diff Collapse all Expand all
66 include(FindPerl)
77
88 set(LLVM_MAIN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR})
9 set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_SRC_DIR}/include/llvm)
9 set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_SRC_DIR}/include)
1010 set(LLVM_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
1111 set(LLVM_TOOLS_BINARY_DIR ${LLVM_BINARY_DIR}/bin)
1212 set(LLVM_EXAMPLES_BINARY_DIR ${LLVM_BINARY_DIR}/examples)
2020 CACHE STRING "Semicolon-separated list of targets to build")
2121 endif( MSVC )
2222
23 if( NOT MSVC )
24 set(CMAKE_CXX_LINK_EXECUTABLE "sh -c \"${CMAKE_CXX_LINK_EXECUTABLE}\"")
25 endif( NOT MSVC )
26
27 # TODO: Eliminate?
28 get_filename_component(llvm_include_path ${LLVM_MAIN_SRC_DIR}/include ABSOLUTE)
29
30 #get_filename_component(llvm_builded_incs_dir ${LLVM_BINARY_DIR}/include/llvm ABSOLUTE)
3123 set(llvm_builded_incs_dir ${LLVM_BINARY_DIR}/include/llvm)
3224
3325 # Add path for custom modules
8274 add_definitions( -wd4355 -wd4715 )
8375 endif( MSVC )
8476
85 include_directories( ${LLVM_BINARY_DIR}/include ${llvm_include_path})
77 include_directories( ${LLVM_BINARY_DIR}/include ${LLVM_MAIN_INCLUDE_DIR})
8678 #link_directories( d:/dev/lib )
8779
8880 #add_subdirectory(lib)
10092 add_subdirectory(utils/TableGen)
10193
10294 add_custom_command(OUTPUT ${llvm_builded_incs_dir}/Intrinsics.gen
103 COMMAND tblgen -gen-intrinsic -I ${llvm_include_path} ${llvm_include_path}/llvm/Intrinsics.td -o ${llvm_builded_incs_dir}/Intrinsics.gen
95 COMMAND tblgen -gen-intrinsic -I ${LLVM_MAIN_INCLUDE_DIR} ${LLVM_MAIN_INCLUDE_DIR}/llvm/Intrinsics.td -o ${llvm_builded_incs_dir}/Intrinsics.gen
10496 DEPENDS tblgen
10597 COMMENT "Building intrinsics.gen...")
10698
5656 message(STATUS "LLVM_HOSTTRIPLE: ${LLVM_HOSTTRIPLE}")
5757
5858 if( MINGW )
59 # tbi: Comprobar que existen las librerias:
6059 set(HAVE_LIBIMAGEHLP 1)
6160 set(HAVE_LIBPSAPI 1)
61 # TODO: Check existence of libraries.
6262 # include(CheckLibraryExists)
6363 # CHECK_LIBRARY_EXISTS(imagehlp ??? . HAVE_LIBIMAGEHLP)
6464 endif( MINGW )
9696 set(ENABLE_THREADS 0)
9797
9898 configure_file(
99 ${LLVM_MAIN_INCLUDE_DIR}/Config/config.h.cmake
99 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/config.h.cmake
100100 ${LLVM_BINARY_DIR}/include/llvm/Config/config.h
101101 )
102102
103103 configure_file(
104 ${LLVM_MAIN_INCLUDE_DIR}/ADT/iterator.cmake
104 ${LLVM_MAIN_INCLUDE_DIR}/llvm/ADT/iterator.cmake
105105 ${LLVM_BINARY_DIR}/include/llvm/ADT/iterator.h
106106 )
107107
108108 configure_file(
109 ${LLVM_MAIN_INCLUDE_DIR}/Support/DataTypes.h.cmake
109 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Support/DataTypes.h.cmake
110110 ${LLVM_BINARY_DIR}/include/llvm/Support/DataTypes.h
111111 )
112112
113113 configure_file(
114 ${LLVM_MAIN_INCLUDE_DIR}/ADT/hash_map.cmake
114 ${LLVM_MAIN_INCLUDE_DIR}/llvm/ADT/hash_map.cmake
115115 ${LLVM_BINARY_DIR}/include/llvm/ADT/hash_map.h
116116 )
117117
118118 configure_file(
119 ${LLVM_MAIN_INCLUDE_DIR}/ADT/hash_set.cmake
119 ${LLVM_MAIN_INCLUDE_DIR}/llvm/ADT/hash_set.cmake
120120 ${LLVM_BINARY_DIR}/include/llvm/ADT/hash_set.h
121121 )
33
44 macro(tablegen ofn)
55 add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}
6 COMMAND tblgen ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR} -I ${CMAKE_SOURCE_DIR}/lib/Target -I ${llvm_include_path} ${CMAKE_CURRENT_SOURCE_DIR}/${LLVM_TARGET_DEFINITIONS} -o ${ofn}
6 COMMAND tblgen ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR} -I ${CMAKE_SOURCE_DIR}/lib/Target -I ${LLVM_MAIN_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${LLVM_TARGET_DEFINITIONS} -o ${ofn}
77 DEPENDS tblgen ${CMAKE_CURRENT_SOURCE_DIR}/${LLVM_TARGET_DEFINITIONS}
88 COMMENT "Building ${ofn}..."
99 )
22
33 macro(tgen ofn)
44 add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}
5 COMMAND tblgen ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR} -I ${CMAKE_SOURCE_DIR}/lib/Target -I ${llvm_include_path} ${CMAKE_CURRENT_SOURCE_DIR}/Graph.td -o ${ofn}
5 COMMAND tblgen ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR} -I ${CMAKE_SOURCE_DIR}/lib/Target -I ${LLVM_MAIN_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/Graph.td -o ${ofn}
66 DEPENDS
77 tblgen
8 ${llvm_include_path}/llvm/CompilerDriver/Common.td
9 ${llvm_include_path}/llvm/CompilerDriver/Tools.td
8 ${LLVM_MAIN_INCLUDE_DIR}/llvm/CompilerDriver/Common.td
9 ${LLVM_MAIN_INCLUDE_DIR}/llvm/CompilerDriver/Tools.td
1010 COMMENT "Building ${ofn}..."
1111 )
1212 endmacro(tgen ofn)