diff --git a/tests/cmake/idl_compiler_tests/CMakeLists.txt b/tests/cmake/idl_compiler_tests/CMakeLists.txt index 3e9308d58a5..859b233e082 100644 --- a/tests/cmake/idl_compiler_tests/CMakeLists.txt +++ b/tests/cmake/idl_compiler_tests/CMakeLists.txt @@ -49,18 +49,24 @@ function(assert_includes target) get_target_property(interface_include_directories ${target} INTERFACE_INCLUDE_DIRECTORIES) remove_build_interface("${interface_include_directories}" interface_include_directories) + if(DEFINED OPENDDS_CONFIG_INCLUDE_DIR) + if(arg_INTERFACE) + list(APPEND arg_INTERFACE "${OPENDDS_CONFIG_INCLUDE_DIR}") + endif() + list(APPEND arg_PRIVATE "${OPENDDS_CONFIG_INCLUDE_DIR}") + endif() foreach(inc ${arg_INTERFACE}) if(NOT "${inc}" IN_LIST interface_include_directories) message(SEND_ERROR "ERROR: ${target} expected ${inc} in INTERFACE includes") endif() endforeach() - # if(interface_include_directories) - # foreach(inc ${interface_include_directories}) - # if(NOT "${inc}" IN_LIST arg_INTERFACE) - # message(SEND_ERROR "ERROR: ${target} unexpected ${inc} in INTERFACE includes") - # endif() - # endforeach() - # endif() + if(interface_include_directories) + foreach(inc ${interface_include_directories}) + if(NOT "${inc}" IN_LIST arg_INTERFACE) + message(SEND_ERROR "ERROR: ${target} unexpected ${inc} in INTERFACE includes") + endif() + endforeach() + endif() get_target_property(include_directories ${target} INCLUDE_DIRECTORIES) remove_build_interface("${include_directories}" include_directories) foreach(inc ${arg_PRIVATE}) @@ -68,13 +74,13 @@ function(assert_includes target) message(SEND_ERROR "ERROR: ${target} expected ${inc} in PRIVATE includes") endif() endforeach() - # if(include_directories) - # foreach(inc ${include_directories}) - # if(NOT ${inc} IN_LIST arg_PRIVATE) - # message(SEND_ERROR "ERROR: ${target} unexpected ${inc} in PRIVATE includes") - # endif() - # endforeach() - # endif() + if(include_directories) + foreach(inc ${include_directories}) + if(NOT ${inc} IN_LIST arg_PRIVATE) + message(SEND_ERROR "ERROR: ${target} unexpected ${inc} in PRIVATE includes") + endif() + endforeach() + endif() endfunction() function(assert_generated_output file)