mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 06:09:52 -06:00
create_test_source_list: declare functions as extern
This avoids linting thinking that `func_name` can be declared `static`. It is actually in a separate file and found at link time, so explicitly mark it as such.
This commit is contained in:
@@ -93,7 +93,8 @@ bool cmCreateTestSourceList(std::vector<std::string> const& args,
|
|||||||
tests_func_name.end();
|
tests_func_name.end();
|
||||||
tests_func_name.push_back(func_name);
|
tests_func_name.push_back(func_name);
|
||||||
if (!already_declared) {
|
if (!already_declared) {
|
||||||
forwardDeclareCode += cmStrCat("int ", func_name, "(int, char*[]);\n");
|
forwardDeclareCode +=
|
||||||
|
cmStrCat("extern int ", func_name, "(int, char*[]);\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user