cmake_minimum_required(VERSION 2.6) project(mef) set(DESCRIPTION "Mixtures of Exponential Families") set(VERSION 0.2.0) SET(CMAKE_C_FLAGS_DEBUG "-O0") set(LIB_INSTALL_DIR lib CACHE STRING "Install location of libraries") set(BIN_INSTALL_DIR bin CACHE STRING "Install location of executables") macro(add_script script) add_custom_command( OUTPUT ${script} COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${script} ${CMAKE_CURRENT_BINARY_DIR}/${script} ) endmacro(add_script) add_subdirectory(lib) add_subdirectory(tests) add_subdirectory(examples EXCLUDE_FROM_ALL) add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/README.txt COMMAND emacs -Q --batch --visit=${CMAKE_SOURCE_DIR}/README.org --eval "\\(org-ascii-export-to-ascii nil nil nil nil \\'\\(:ascii-charset utf-8\\)\\)" COMMAND mv ${CMAKE_SOURCE_DIR}/README.txt ${CMAKE_SOURCE_DIR}/README DEPENDS ${CMAKE_SOURCE_DIR}/README.org ) add_custom_target(README DEPENDS README.txt) add_custom_command(OUTPUT index.html COMMAND emacs -Q --batch --visit=${CMAKE_SOURCE_DIR}/README.org --funcall org-html-export-to-html COMMAND mv ${CMAKE_SOURCE_DIR}/README.html index.html DEPENDS ${CMAKE_SOURCE_DIR}/README.org ) add_custom_command(OUTPUT libmef-${VERSION}.tar.gz COMMAND darcs dist -d ${CMAKE_CURRENT_BINARY_DIR}/libmef-${VERSION} ) add_custom_target(dist DEPENDS index.html libmef-${VERSION}.tar.gz) enable_testing() add_test(tests/test_gamma_fixed_rate tests/test_gamma_fixed_rate) add_test(tests/test_gaussian tests/test_gaussian) add_test(tests/test_generalized_gaussian tests/test_generalized_gaussian) add_test(tests/test_kl tests/test_kl) add_test(tests/test_mixture tests/test_mixture) add_test(tests/test_multivariate_gaussian tests/test_multivariate_gaussian)