I am Charmie

メモとログ

CMakeLists.txt for GraphM library

Here's a CMakeLists.txt for GraphM library.

[code lang="bash"]

cmake_minimum_required(VERSION 2.8) set(PROJ_NAME graphm) project(${PROJ_NAME})

set C++ flags

set(CMAKE_WARN_DEPRECATED ON) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -fPIC")

for external libraries

find_package(GSL REQUIRED) include_directories(${GSL_INCLUDE_DIRS})

interface classes

set(modules_interface "experiment" "hungarian" "rpc" "graph" "algorithm" ) foreach(m ${modules_interface}) message(${m}) add_library(${m} ${m}.cpp ${m}.h ) target_link_libraries(${m} ${GSL_LIBRARIES} ) endforeach(m)

graph matching algorithms

set(modules_algorithm "algorithm_ca" "algorithm_path" "algorithm_ext" "algorithm_fsol" "algorithm_iden" "algorithm_lp" "algorithm_qcv" "algorithm_rand" "algorithm_rank" "algorithm_umeyama" "algorithm_unif" ) foreach(m ${modules_algorithm}) message(${m}) add_library(${m} ${m}.cpp ${m}.h ) target_link_libraries(${m} ${GSL_LIBRARIES} "hungarian" ) endforeach(m)

main binary

add_executable(${PROJ_NAME} main.cpp ) target_link_libraries(${PROJ_NAME} ${GSL_LIBRARIES} ${modules_interface} ${modules_algorithm} ) [/code]