Fix add_template

The path to the coniguration file must be an absolute path
(CMAKE_SOURCE_DIR) instead of a relative one
(CMAKE_CURRENT_SOURCE_DIR). This fixes cdc_datatypes.
This commit is contained in:
Markus Mäkelä
2020-04-27 10:22:51 +03:00
parent 87328228f8
commit a38b475e90

View File

@ -10,7 +10,7 @@ endfunction()
# Helper function to add a configuration template to the global test definitions list.
# Parameters are as in add_test_executable().
function(add_template name template labels)
set(config_template_path "${CMAKE_CURRENT_SOURCE_DIR}/cnf/maxscale.cnf.template.${template}")
set(config_template_path "${CMAKE_SOURCE_DIR}/maxscale-system-test/cnf/maxscale.cnf.template.${template}")
set(new_def "{\"${name}\", \"${config_template_path}\", \"${labels}\"}")
set(TEST_DEFINITIONS "${TEST_DEFINITIONS}${new_def}," CACHE INTERNAL "")
endfunction()