File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,7 +41,14 @@ function(add_schema_dependent_test name sdai_lib exe_args )
4141 message (STATUS "include dir for ${sdai_lib} : ${sdai_src_path} " )
4242 add_executable (tst_${name} "${name} .cc" )
4343 set_target_properties (tst_${name} PROPERTIES EXCLUDE_FROM_ALL ON )
44- set_property (TARGET tst_${name} APPEND PROPERTY INCLUDE_DIRECTORIES ${sdai_src_path} ${ARGV3} )
44+ if ("${CMAKE_VERSION} " VERSION_GREATER "2.8.7" )
45+ # INCLUDE_DIRECTORIES property added in cmake 2.8.8
46+ set_property (TARGET tst_${name} APPEND PROPERTY INCLUDE_DIRECTORIES ${sdai_src_path} ${ARGV3} )
47+ else ()
48+ foreach (ipath ${sdai_src_path} ${ARGV3} )
49+ set_property (TARGET tst_${name} APPEND PROPERTY COMPILE_FLAGS "-I${ipath} " )
50+ endforeach (ipath ${sdai_src_path} ${ARGV3} )
51+ endif ("${CMAKE_VERSION} " VERSION_GREATER "2.8.7" )
4552 if (NOT ${ARGV4} STREQUAL "" )
4653 set_property (TARGET tst_${name} APPEND PROPERTY COMPILE_FLAGS ${ARGV4} )
4754 endif (NOT ${ARGV4} STREQUAL "" )
You can’t perform that action at this time.
0 commit comments