@@ -134,6 +134,8 @@ function(SOUFFLE_RUN_TEST_HELPER)
134
134
#PARAM_FUNCTORS - with -L for finding functor library in the testsuite
135
135
#PARAM_NEGATIVE - should it fail or not
136
136
#PARAM_MULTI_TEST - used to distinguish "multi-tests", sort of left over from automake
137
+ #PARAM_NO_PROCESSOR - should the C preprocessor be disabled or not
138
+ #PARAM_INCLUDE_DIRS - list of include directory paths, relative to the test input directory
137
139
#Basically, the same test dir has multiple sets of facts / outputs
138
140
#We should just get rid of this and make multiple tests
139
141
#It also means we need to use slightly different naming for tests
@@ -144,7 +146,7 @@ function(SOUFFLE_RUN_TEST_HELPER)
144
146
PARAM
145
147
"COMPILED;FUNCTORS;NEGATIVE;MULTI_TEST;NO_PREPROCESSOR" # Options
146
148
"TEST_NAME;CATEGORY;FACTS_DIR_NAME;EXTRA_DATA" #Single valued options
147
- ""
149
+ "INCLUDE_DIRS" # Multi-valued options
148
150
${ARGV}
149
151
)
150
152
@@ -182,6 +184,13 @@ function(SOUFFLE_RUN_TEST_HELPER)
182
184
set (INPUT_DIR "${CMAKE_CURRENT_SOURCE_DIR} /${PARAM_TEST_NAME} " )
183
185
set (FACTS_DIR "${INPUT_DIR} /${PARAM_FACTS_DIR_NAME} " )
184
186
187
+ if (PARAM_INCLUDE_DIRS)
188
+ ## generate -I include directory options
189
+ list (TRANSFORM PARAM_INCLUDE_DIRS PREPEND "${INPUT_DIR} /" )
190
+ list (TRANSFORM PARAM_INCLUDE_DIRS PREPEND "-I" )
191
+ list (APPEND EXTRA_FLAGS ${PARAM_INCLUDE_DIRS} )
192
+ endif ()
193
+
185
194
if (PARAM_MULTI_TEST)
186
195
set (DATA_CHECK_DIR "${INPUT_DIR} /${PARAM_FACTS_DIR_NAME} " )
187
196
set (MT_EXTRA_SUFFIX "_${PARAM_FACTS_DIR_NAME} " )
0 commit comments