git-svn-id: svn://db.shs.com.ru/pip@205 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
if (${WIN32})
|
||||
if (WIN32)
|
||||
find_package(MinGW REQUIRED)
|
||||
find_library(PIP_LIBRARY pip ${MINGW_LIB})
|
||||
set(PIP_INCLUDES ${MINGW_INCLUDE}/pip)
|
||||
set(PIP_CMG ${MINGW_BIN}/pip_cmg.exe)
|
||||
else ()
|
||||
find_library(PIP_LIBRARY pip /usr/lib/)
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
||||
find_library(PTHREAD_LIBRARY pthread)
|
||||
find_library(DL_LIBRARY dl)
|
||||
list(APPEND PIP_LIBRARY ${PTHREAD_LIBRARY} ${DL_LIBRARY})
|
||||
@@ -31,12 +31,12 @@ endif ()
|
||||
|
||||
macro (pip_code_model SRC RESULT)
|
||||
set(RESULT "")
|
||||
set(OPTIONS "")
|
||||
set(OPTS "")
|
||||
set(_IS_OPT false)
|
||||
foreach (_A ${ARGN})
|
||||
#message(STATUS ${_A})
|
||||
if (_IS_OPT)
|
||||
set (OPTIONS ${_A})
|
||||
set (OPTS ${_A})
|
||||
else ()
|
||||
if ("${_A}" STREQUAL "OPTIONS")
|
||||
set(_IS_OPT true)
|
||||
@@ -47,7 +47,7 @@ macro (pip_code_model SRC RESULT)
|
||||
endforeach()
|
||||
#message(STATUS "src = ${CMAKE_CURRENT_SOURCE_DIR}/${SRC}")
|
||||
#message(STATUS "result = ${RESULT}")
|
||||
#message(STATUS "options = ${OPTIONS}")
|
||||
#message(STATUS "options = ${OPTS}")
|
||||
set(NEED_PARSE FALSE CACHE BOOL "NEED_PARSE" FORCE)
|
||||
if (DEFINED CACHE_CMG_FILES)
|
||||
string(REPLACE " " ";" CMG_LIST_C "${CACHE_CMG_FILES}")
|
||||
@@ -71,8 +71,8 @@ macro (pip_code_model SRC RESULT)
|
||||
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 ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_ccm -I${PIP_INCLUDES} ${CMAKE_CURRENT_SOURCE_DIR}/${SRC} OUTPUT_VARIABLE CMG_OUT)
|
||||
#message(STATUS "exec \"-qP ${OPTS} -o ${PROJECT_NAME}_ccm -I${PIP_INCLUDES} ${SRC}\"")
|
||||
execute_process(COMMAND ${PIP_CMG} -qP ${OPTS} -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}")
|
||||
|
||||
Reference in New Issue
Block a user