mirror of https://github.com/procxx/kepka.git
				
				
				
			
		
			
				
	
	
		
			101 lines
		
	
	
		
			3.6 KiB
		
	
	
	
		
			Diff
		
	
	
	
			
		
		
	
	
			101 lines
		
	
	
		
			3.6 KiB
		
	
	
	
		
			Diff
		
	
	
	
| diff -rupN llvm-3.4.src/CMakeLists.txt llvm-3.4.src.cotire/CMakeLists.txt
 | |
| --- llvm-3.4.src/CMakeLists.txt	2013-11-25 19:34:26.000000000 +0100
 | |
| +++ llvm-3.4.src.cotire/CMakeLists.txt	2014-01-06 20:25:12.000000000 +0100
 | |
| @@ -1,7 +1,7 @@
 | |
|  # See docs/CMake.html for instructions about how to build LLVM with CMake.
 | |
|  
 | |
|  project(LLVM)
 | |
| -cmake_minimum_required(VERSION 2.8)
 | |
| +cmake_minimum_required(VERSION 2.8.12)
 | |
|  
 | |
|  # Add path for custom modules
 | |
|  set(CMAKE_MODULE_PATH
 | |
| @@ -25,6 +25,8 @@ if ( LLVM_USE_FOLDERS )
 | |
|  endif()
 | |
|  
 | |
|  include(VersionFromVCS)
 | |
| +include(cotire)
 | |
| +set_property(DIRECTORY PROPERTY COTIRE_UNITY_LINK_LIBRARIES_INIT "COPY_UNITY")
 | |
|  
 | |
|  option(LLVM_APPEND_VC_REV
 | |
|    "Append the version control system revision id to LLVM version" OFF)
 | |
| diff -rupN llvm-3.4.src/cmake/modules/AddLLVM.cmake llvm-3.4.src.cotire/cmake/modules/AddLLVM.cmake
 | |
| --- llvm-3.4.src/cmake/modules/AddLLVM.cmake	2013-08-27 21:25:01.000000000 +0200
 | |
| +++ llvm-3.4.src.cotire/cmake/modules/AddLLVM.cmake	2014-01-06 20:25:50.000000000 +0100
 | |
| @@ -41,6 +41,10 @@ macro(add_llvm_library name)
 | |
|    # property has been set to an empty value.
 | |
|    get_property(lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${name})
 | |
|    target_link_libraries(${name} ${lib_deps})
 | |
| +if (COMMAND cotire)
 | |
| +  set_target_properties(${name} PROPERTIES COTIRE_UNITY_SOURCE_POST_UNDEFS "DEBUG_TYPE")
 | |
| +  cotire(${name})
 | |
| +endif()
 | |
|  endmacro(add_llvm_library name)
 | |
|  
 | |
|  macro(add_llvm_loadable_module name)
 | |
| @@ -78,6 +82,10 @@ ${name} ignored.")
 | |
|            ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
 | |
|        endif()
 | |
|      endif()
 | |
| +if (COMMAND cotire)
 | |
| +  set_target_properties(${name} PROPERTIES COTIRE_UNITY_SOURCE_POST_UNDEFS "DEBUG_TYPE")
 | |
| +  cotire(${name})
 | |
| +endif()
 | |
|    endif()
 | |
|  
 | |
|    set_target_properties(${name} PROPERTIES FOLDER "Loadable modules")
 | |
| @@ -119,6 +127,10 @@ macro(add_llvm_tool name)
 | |
|      endif()
 | |
|    endif()
 | |
|    set_target_properties(${name} PROPERTIES FOLDER "Tools")
 | |
| +if (COMMAND cotire)
 | |
| +  set_target_properties(${name} PROPERTIES COTIRE_UNITY_SOURCE_POST_UNDEFS "DEBUG_TYPE")
 | |
| +  cotire(${name})
 | |
| +endif()
 | |
|  endmacro(add_llvm_tool name)
 | |
|  
 | |
|  
 | |
| @@ -132,12 +144,20 @@ macro(add_llvm_example name)
 | |
|      install(TARGETS ${name} RUNTIME DESTINATION examples)
 | |
|    endif()
 | |
|    set_target_properties(${name} PROPERTIES FOLDER "Examples")
 | |
| +if (COMMAND cotire)
 | |
| +  set_target_properties(${name} PROPERTIES COTIRE_UNITY_SOURCE_POST_UNDEFS "DEBUG_TYPE")
 | |
| +  cotire(${name})
 | |
| +endif()
 | |
|  endmacro(add_llvm_example name)
 | |
|  
 | |
|  
 | |
|  macro(add_llvm_utility name)
 | |
|    add_llvm_executable(${name} ${ARGN})
 | |
|    set_target_properties(${name} PROPERTIES FOLDER "Utils")
 | |
| +if (COMMAND cotire)
 | |
| +  set_target_properties(${name} PROPERTIES COTIRE_UNITY_SOURCE_POST_UNDEFS "DEBUG_TYPE")
 | |
| +  cotire(${name})
 | |
| +endif()
 | |
|  endmacro(add_llvm_utility name)
 | |
|  
 | |
|  
 | |
| @@ -245,6 +265,10 @@ function(add_unittest test_suite test_na
 | |
|      set(target_compile_flags "${target_compile_flags} -Wno-variadic-macros")
 | |
|    endif ()
 | |
|    set_property(TARGET ${test_name} PROPERTY COMPILE_FLAGS "${target_compile_flags}")
 | |
| +if (COMMAND cotire)
 | |
| +  set_target_properties(${name} PROPERTIES COTIRE_UNITY_SOURCE_POST_UNDEFS "DEBUG_TYPE")
 | |
| +  cotire(${name})
 | |
| +endif()
 | |
|  endfunction()
 | |
|  
 | |
|  # This function provides an automatic way to 'configure'-like generate a file
 | |
| diff -rupN llvm-3.4.src/lib/Support/CMakeLists.txt llvm-3.4.src.cotire/lib/Support/CMakeLists.txt
 | |
| --- llvm-3.4.src/lib/Support/CMakeLists.txt	2013-09-04 18:00:12.000000000 +0200
 | |
| +++ llvm-3.4.src.cotire/lib/Support/CMakeLists.txt	2014-01-06 20:27:36.000000000 +0100
 | |
| @@ -1,3 +1,7 @@
 | |
| +if (COMMAND cotire)
 | |
| +	set_source_files_properties (IsInf.cpp IsNAN.cpp PROPERTIES COTIRE_EXCLUDED TRUE)
 | |
| +endif()
 | |
| +
 | |
|  add_llvm_library(LLVMSupport
 | |
|    APFloat.cpp
 | |
|    APInt.cpp
 |