From 5f9a81132c6f222169080276606ad39519a064b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B5=D0=BB=D0=B8=D0=BF=D0=B5=D0=BD=D0=BA=D0=BE=20?= =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD?= Date: Fri, 3 Apr 2015 07:12:23 +0000 Subject: [PATCH] FindPIP fixes git-svn-id: svn://db.shs.com.ru/pip@61 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5 --- FindPIP.cmake | 10 +++++++--- src/io/pibinarylog.h | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/FindPIP.cmake b/FindPIP.cmake index d80c0c8c..a8a28753 100644 --- a/FindPIP.cmake +++ b/FindPIP.cmake @@ -45,7 +45,7 @@ macro (pip_code_model SRC RESULT) endif () endif () endforeach() - #message(STATUS "src = ${SRC}") + #message(STATUS "src = ${CMAKE_CURRENT_SOURCE_DIR}/${SRC}") #message(STATUS "result = ${RESULT}") #message(STATUS "options = ${OPTIONS}") set(NEED_PARSE FALSE CACHE BOOL "NEED_PARSE" FORCE) @@ -64,10 +64,15 @@ macro (pip_code_model SRC RESULT) set(NEED_PARSE TRUE) #message(STATUS "NEW cache") endif () + set(${RESULT} ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_ccm.cpp) + #message(STATUS "Res = ${${RESULT}}") + if (NOT EXISTS ${${RESULT}}) + set(NEED_PARSE TRUE) + endif () if (NEED_PARSE) message(STATUS "Creating code model based on \"${SRC}\", please wait ... ") #message(STATUS "exec \"-qP ${OPTIONS} -o ${PROJECT_NAME}_ccm -I${PIP_INCLUDES} ${SRC}\"") - execute_process(COMMAND ${PIP_CMG} -qP ${OPTIONS} -o ${PROJECT_NAME}_ccm -I${PIP_INCLUDES} ${SRC} OUTPUT_VARIABLE CMG_OUT) + execute_process(COMMAND ${PIP_CMG} -qP ${OPTIONS} -o ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_ccm -I${PIP_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR}/${SRC} OUTPUT_VARIABLE CMG_OUT) message(STATUS "Creating code model done, to use it include \"${PROJECT_NAME}_ccm.h\"") string(REPLACE "\n" ";" CMG_LIST "${CMG_OUT}") string(REPLACE "\n" " " CMG_LIST_S "${CMG_OUT}") @@ -81,6 +86,5 @@ macro (pip_code_model SRC RESULT) endif () #message(STATUS ${CMG_OUT}) #message(STATUS ${CACHE_CMG_FILES}) - set(${RESULT} ${PROJECT_NAME}_ccm.cpp) endmacro (pip_code_model) diff --git a/src/io/pibinarylog.h b/src/io/pibinarylog.h index 8d7b6650..03e9d082 100644 --- a/src/io/pibinarylog.h +++ b/src/io/pibinarylog.h @@ -76,7 +76,7 @@ public: llong log_size; PISystemTime start_time; PISystemTime end_time; - PIMap records; + PIMap records; }; //! \brief Struct contains position, ID and timestamp of record in file @@ -99,7 +99,7 @@ public: //! Returns current file prefix PIString filePrefix() const {return property("filePrefix").toString();} - //! Current LogDir, returns directory where billogs wiil be saved + //! Default ID, used in \a write function int defaultID() const {return default_id;} //! Returns current play speed