git-svn-id: svn://db.shs.com.ru/pip@324 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2017-03-28 11:47:01 +00:00
parent f9b50e84b5
commit 72ec37b548

View File

@@ -1,22 +1,26 @@
macro(PIP_EXTRACT_OPTIONS _pip_files _pip_options)
macro(PIP_EXTRACT_OPTIONS _pip_files _pip_options _abs)
set(${_pip_files})
set(${_pip_options})
set(_PIP_DOING_OPTIONS FALSE)
foreach(_currentArg ${ARGN})
if("x${_currentArg}" STREQUAL "xOPTIONS")
set(_PIP_DOING_OPTIONS TRUE)
if("x${_currentArg}" STREQUAL "xABSOLUTE")
set(${_abs} TRUE)
else()
if(_PIP_DOING_OPTIONS)
list(APPEND ${_pip_options} "${_currentArg}")
if("x${_currentArg}" STREQUAL "xOPTIONS")
set(_PIP_DOING_OPTIONS TRUE)
else()
list(APPEND ${_pip_files} "${_currentArg}")
if(_PIP_DOING_OPTIONS)
list(APPEND ${_pip_options} "${_currentArg}")
else()
list(APPEND ${_pip_files} "${_currentArg}")
endif()
endif()
endif()
endforeach()
endmacro()
macro(pip_code_model RESULT)
PIP_EXTRACT_OPTIONS(CCM_SRC OPTS ${ARGN})
PIP_EXTRACT_OPTIONS(CCM_SRC OPTS ABS ${ARGN})
#message(STATUS "src = ${CCM_SRC}")
#message(STATUS "result = ${RESULT}")
#message(STATUS "options = \"${CCM_OPTS}\"")
@@ -27,9 +31,15 @@ macro(pip_code_model RESULT)
set(CCM_OUT ${CMAKE_CURRENT_BINARY_DIR}/ccm_${PROJECT_NAME}.cpp)
set(${RESULT} ${${RESULT}} ${CCM_OUT})
set(CCM_FILES)
foreach(csrc ${CCM_SRC})
list(APPEND CCM_FILES "${CMAKE_CURRENT_SOURCE_DIR}/${csrc}")
endforeach()
if (ABS)
foreach(csrc ${CCM_SRC})
list(APPEND CCM_FILES "${csrc}")
endforeach()
else()
foreach(csrc ${CCM_SRC})
list(APPEND CCM_FILES "${CMAKE_CURRENT_SOURCE_DIR}/${csrc}")
endforeach()
endif()
#message(STATUS "CCM = ${RESULT}")
if(NOT DEFINED PIP_DLL_DIR)
set(PIP_DLL_DIR ${CMAKE_CURRENT_BINARY_DIR})