zoukankan      html  css  js  c++  java
  • CMake与OpenMP

    CMake与OpenMP

    cmake_minimum_required (VERSION 2.6)
    project (TEST)
    
    set (TEST_VERSION 0.1)
    
    set(CMAKE_BUILD_TYPE "Debug")
    set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb -DDEBUG")
    set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")
    
    set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/../bin)
    FIND_PACKAGE( OpenMP REQUIRED)
    if(OPENMP_FOUND)
    message("OPENMP FOUND")
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
    set(CMAKE_EXE_LINKER_FLAGS"${CMAKE_EXE_LINKER_FLAGS}${OpenMP_EXE_LINKER_FLAGS}")
    endif()
    aux_source_directory(${PROJECT_SOURCE_DIR}/src DIR_SRC)
    
    include_directories(${PROJECT_SOURCE_DIR}/src)
    
    include_directories(${PROJECT_SOURCE_DIR}/src)
    #include_directories(${PROJECT_SOURCE_DIR}/include)
    #include_directories(${PROJECT_SOURCE_DIR}/include/LDL)
    #include_directories(${PROJECT_SOURCE_DIR}/include/AMD)
    
    link_directories(${PROJECT_SOURCE_DIR}/lib)
    
    add_executable(main ${DIR_SRC})
    
    
    #target_link_libraries(main Test)
    #target_link_libraries(main libamd.a)
    #target_link_libraries(main libldl.a)
    #target_link_libraries(main libsuitesparseconfig.a)
    #target_link_libraries(main libopenblas.a)
    #target_link_libraries(main -lm)
    #target_link_libraries(main -lpthread)
    
    #target_link_libraries(main libblas.a)
    
    
  • 相关阅读:
    Customizing the Test Runner
    Creating Custom Shadows ——创建自定义shadow
    Extending Robolectric
    Driving the Activity Lifecycle
    Configuring Robolectric
    Writing Your First Test
    Getting Started
    Robolectric Test-Drive Your Android Code
    为知笔记 | 为知笔记 Markdown 新手指南
    LeetCode_238_Product of Array Except Self
  • 原文地址:https://www.cnblogs.com/qujingtongxiao/p/11101425.html
Copyright © 2011-2022 走看看