Ignore:
Timestamp:
Sep 19, 2015, 7:25:09 AM (4 years ago)
Author:
cameron
Message:

Hongpu's option to use Boost mmap; fix an include for std::iota

File:
1 edited

Legend:

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

    r4777 r4778  
    1515endif()
    1616option(ENABLE_MULTIPLEXING "Compiling the Multiplexing Module")
     17option(USE_BOOST_MMAP "Using mmap from Boost.Iostreams")
    1718option(DISABLE_PREGENERATED_UCD_FUNCTIONS "Disable compiling the pregenerated UCD functions")
    1819
     
    5657
    5758if(ENABLE_MULTIPLEXING)
    58 find_package(Boost COMPONENTS system REQUIRED)
    59 else()
    60 find_package(Boost)
     59  SET(REQ_BOOST_COMPONENTS ${REQ_BOOST_COMPONENTS} system)
     60endif()
     61if(USE_BOOST_MMAP)
     62  SET(REQ_BOOST_COMPONENTS ${REQ_BOOST_COMPONENTS} iostreams)
     63endif()
     64
     65if(REQ_BOOST_COMPONENTS)
     66  find_package(Boost COMPONENTS ${REQ_BOOST_COMPONENTS} REQUIRED)
    6167endif()
    6268
     
    121127    link_directories(${Boost_LIBRARY_DIR})
    122128    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_BOOST")
     129    target_link_libraries(icgrep ${Boost_LIBRARIES})
    123130ENDIF()
    124131
    125132target_link_libraries (icgrep UCDlib PabloADT RegExpCompiler CCADT ${REQ_LLVM_LIBRARIES})
    126133
     134IF(USE_BOOST_MMAP)
     135  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_BOOST_MMAP")
     136ENDIF()
    127137
    128138
Note: See TracChangeset for help on using the changeset viewer.