pip_code_model macro now automatic add CMAKE_CURRENT_SOURCE_DIR to relative pathes, no ABSOLUTE need
PIOpenCL first working version
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
#[[
|
||||
|
||||
pip_code_model(<out_var> file0 [file1 ...] [OPTIONS opt0 [opt1 ...] ] [ABSOLUTE])
|
||||
pip_code_model(<out_var> file0 [file1 ...] [OPTIONS opt0 [opt1 ...] ])
|
||||
|
||||
Generate code model files for source files file0 [file1 ...]
|
||||
|
||||
Options you can see by exec "pip_cmg -h"
|
||||
If not ABSOLUTE source files will be prepended by CMAKE_CURRENT_SOURCE_DIR
|
||||
Relative files pathes read from CMAKE_CURRENT_SOURCE_DIR
|
||||
You should add ${<out_var>} to your target
|
||||
|
||||
|
||||
@@ -53,15 +53,13 @@ macro(pip_code_model RESULT)
|
||||
set(CCM_OUT ${CMAKE_CURRENT_BINARY_DIR}/ccm_${PROJECT_NAME}.cpp)
|
||||
set(${RESULT} ${${RESULT}} ${CCM_OUT})
|
||||
set(CCM_FILES)
|
||||
if (ABS)
|
||||
foreach(csrc ${CCM_SRC})
|
||||
foreach(csrc ${CCM_SRC})
|
||||
if (IS_ABSOLUTE "${csrc}")
|
||||
list(APPEND CCM_FILES "${csrc}")
|
||||
endforeach()
|
||||
else()
|
||||
foreach(csrc ${CCM_SRC})
|
||||
else()
|
||||
list(APPEND CCM_FILES "${CMAKE_CURRENT_SOURCE_DIR}/${csrc}")
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
#message(STATUS "CCM = ${RESULT}")
|
||||
if(NOT DEFINED PIP_DLL_DIR)
|
||||
set(PIP_DLL_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
Reference in New Issue
Block a user