Changeset 5178 for icGREP


Ignore:
Timestamp:
Oct 4, 2016, 7:55:11 AM (3 years ago)
Author:
cameron
Message:

Simplify build to allow easier determination/selection of LLVM library

Location:
icGREP/icgrep-devel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/README-icgrep.txt

    r5043 r5178  
    3434sudo apt-get install libboost-all-dev
    3535
     36
    3637To build LLVM,
    3738(L1) open a terminal window and cd to the llvm-build directory
    3839(L2) enter the following command to build the makefiles
    39 cmake -DCMAKE_INSTALL_PREFIX=../libllvm -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_TOOLS=OFF -DLLVM_BUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++ -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang ../llvm-3.8.0.src
     40cmake -DCMAKE_INSTALL_PREFIX=../libllvm -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_BUILD_TOOLS=OFF -DLLVM_BUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release ../llvm-3.8.0.src
    4041(L3) Still in the llvm-build directory, enter the commands "make" and then "make install"
    4142
     
    4445(IC1)  open a terminal window and cd to the icgrep-build directory
    4546(IC2)  enter the following command to build the makefiles
    46 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++ -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang ../icgrep
     47cmake -DCMAKE_PREFIX_PATH=../libllvm -DCMAKE_BUILD_TYPE=Release ../icgrep
    4748(IC3) Enter the command "make"
    4849
  • icGREP/icgrep-devel/icgrep/CMakeLists.txt

    r5172 r5178  
    1 cmake_minimum_required (VERSION 2.8)
     1cmake_minimum_required (VERSION 3.2.0)
    22
    33project (icgrep)
     
    66# The version number.
    77set (icgrep_VERSION_MAJOR 1)
    8 set (icgrep_VERSION_MINOR 5)
     8set (icgrep_VERSION_MINOR 6)
    99
    1010option(ENABLE_MULTIPLEXING "Compiling the Multiplexing Module")
     
    1212option(PRINT_TIMING_INFORMATION "Write compilation and execution timing information to standard error stream")
    1313
    14 # configure a header file to pass some of the CMake settings
    15 # to the source code
    16 #configure_file (
    17 #  "${PROJECT_SOURCE_DIR}/icgrepconfig.h.in"
    18 #  "${PROJECT_BINARY_DIR}/icgrepconfig.h"
    19 #  )
    20 
    21 # LLVM set up
    22 #
    23 # A convenience variable:
    24 set(LLVM_ROOT "../libllvm" CACHE PATH "Root of LLVM install.")
    25 
    26 # A bit of a sanity check:
    27 if( NOT EXISTS ${LLVM_ROOT}/include/llvm )
    28 message(FATAL_ERROR "LLVM_ROOT (${LLVM_ROOT}) is not a valid LLVM install")
    29 endif()
    30 
    31 # We incorporate the CMake features provided by LLVM:
    32 set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${LLVM_ROOT}/share/llvm/cmake;${CMAKE_CURRENT_SOURCE_DIR}/cmake")
    33 
    34 include(LLVMConfig)
     14find_package(LLVM REQUIRED CONFIG)
     15
     16message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
     17message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
     18
    3519
    3620# Now set the header and library paths:
     
    5539set(LLVM_ALL_TARGETS AArch64 AMDGPU ARM BPF CppBackend Hexagon Mips MSP430 NVPTX PowerPC Sparc SystemZ X86 XCore)
    5640llvm_map_components_to_libnames(REQ_LLVM_LIBRARIES ${LLVM_ALL_TARGETS} mcjit native IRReader Linker)
    57 
    58 message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION} in ${LLVM_ROOT_DIR}")
    5941
    6042# Check if boost has been installed on this system.
Note: See TracChangeset for help on using the changeset viewer.