diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ea6ad6..7ffe4ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,6 @@ aux_source_directory(vendor VENDOR_SRC) add_dependencies(core sql) -configure_file("core.ini" "core.ini" COPYONLY) configure_file("version.h.in" "version.h" @ONLY) @@ -40,9 +39,9 @@ add_custom_target(sql ) add_custom_target(run - COMMAND ./core start + COMMAND ${CMAKE_BINARY_DIR}/core start DEPENDS core - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} ) add_custom_target(test @@ -59,24 +58,24 @@ add_custom_target(docs IF(CMAKE_BUILD_TYPE MATCHES Debug) message("debug mode") add_custom_target(debug - COMMAND gdb ./core + COMMAND gdb ${CMAKE_BINARY_DIR}/core DEPENDS core - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} ) add_custom_target(valgrind - COMMAND valgrind -s ./core start + COMMAND valgrind -s ${CMAKE_BINARY_DIR}/core start DEPENDS core - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} ) add_custom_target(valgrind-leak - COMMAND valgrind --leak-check=full --show-leak-kinds=all ./core start + COMMAND valgrind --leak-check=full --show-leak-kinds=all ${CMAKE_BINARY_DIR}/core start DEPENDS core - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} ) add_custom_target(valgrind-callgrind - COMMAND valgrind --tool=callgrind ./core start + COMMAND valgrind --tool=callgrind ${CMAKE_BINARY_DIR}/core start DEPENDS core - WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} ) add_custom_target(coverage COMMAND gcovr -s --root ${CMAKE_SOURCE_DIR} -e ${CMAKE_SOURCE_DIR}/vendor --html-details ${CMAKE_BINARY_DIR}/coverage.html --html-title "Emgauwa Core Coverage" ${CMAKE_BINARY_DIR}/CMakeFiles/core.dir