You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
833 B

  1. cmake_minimum_required(VERSION 2.6)
  2. project(sylvan C CXX)
  3. include_directories(.)
  4. add_executable(mc mc.c getrss.h getrss.c)
  5. target_link_libraries(mc sylvan)
  6. add_executable(lddmc lddmc.c getrss.h getrss.c)
  7. target_link_libraries(lddmc sylvan)
  8. add_executable(simple simple.cpp)
  9. target_link_libraries(simple sylvan stdc++)
  10. include(CheckIncludeFiles)
  11. check_include_files("gperftools/profiler.h" HAVE_PROFILER)
  12. if(HAVE_PROFILER)
  13. set_target_properties(mc PROPERTIES COMPILE_DEFINITIONS "HAVE_PROFILER")
  14. target_link_libraries(mc profiler)
  15. set_target_properties(lddmc PROPERTIES COMPILE_DEFINITIONS "HAVE_PROFILER")
  16. target_link_libraries(lddmc profiler)
  17. endif()
  18. if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
  19. # add argp library for OSX
  20. target_link_libraries(mc argp)
  21. target_link_libraries(lddmc argp)
  22. endif()