diff options
author | Brad King <brad.king@kitware.com> | 2023-11-28 14:44:24 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-11-28 14:44:49 (GMT) |
commit | 806c40a38fc6e1996738173ecfa23a26f7502dbf (patch) | |
tree | d1e34d5456c62ce9ee7bd97bac106e080ab74d3b | |
parent | 2d0b7798dbaa5625496907a97973087be8db5f53 (diff) | |
parent | 9ede6138b71ac2ab961b0954b10a9dc03cf77b37 (diff) | |
download | CMake-806c40a38fc6e1996738173ecfa23a26f7502dbf.zip CMake-806c40a38fc6e1996738173ecfa23a26f7502dbf.tar.gz CMake-806c40a38fc6e1996738173ecfa23a26f7502dbf.tar.bz2 |
Merge topic 'tests-c99'
9ede6138b7 Tests: Improve C compatibility of LoadCommand tests
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9002
-rw-r--r-- | Tests/LoadCommand/CMakeCommands/cmTestCommand.c | 13 | ||||
-rw-r--r-- | Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c | 15 |
2 files changed, 17 insertions, 11 deletions
diff --git a/Tests/LoadCommand/CMakeCommands/cmTestCommand.c b/Tests/LoadCommand/CMakeCommands/cmTestCommand.c index 7176ebe..ba13727 100644 --- a/Tests/LoadCommand/CMakeCommands/cmTestCommand.c +++ b/Tests/LoadCommand/CMakeCommands/cmTestCommand.c @@ -16,14 +16,14 @@ static int CCONV InitialPass(void* inf, void* mf, int argc, char* argv[]) { char* file; char* str; - char* srcs; + const char* srcs; const char* cstr; char buffer[1024]; void* source_file; char* args[2]; - char* ccArgs[4]; - char* ccDep[1]; - char* ccOut[1]; + const char* ccArgs[4]; + const char* ccDep[1]; + const char* ccOut[1]; cmLoadedCommandInfo* info = (cmLoadedCommandInfo*)inf; cmVTKWrapTclData* cdata = @@ -148,7 +148,10 @@ static int CCONV InitialPass(void* inf, void* mf, int argc, char* argv[]) if (info->CAPI->GetTotalArgumentSize(2, args) != 13) { return 0; } - info->CAPI->ExecuteCommand(mf, "SET", 2, args); + + ccArgs[0] = "TEST_EXEC"; + ccArgs[1] = "TRUE"; + info->CAPI->ExecuteCommand(mf, "SET", 2, ccArgs); /* make sure we can find the source file */ if (!info->CAPI->GetSource(mf, argv[1])) { diff --git a/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c b/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c index 7176ebe..e3b332c 100644 --- a/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c +++ b/Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c @@ -16,14 +16,14 @@ static int CCONV InitialPass(void* inf, void* mf, int argc, char* argv[]) { char* file; char* str; - char* srcs; - const char* cstr; + const char* srcs; + char* cstr; char buffer[1024]; void* source_file; char* args[2]; - char* ccArgs[4]; - char* ccDep[1]; - char* ccOut[1]; + const char* ccArgs[4]; + const char* ccDep[1]; + const char* ccOut[1]; cmLoadedCommandInfo* info = (cmLoadedCommandInfo*)inf; cmVTKWrapTclData* cdata = @@ -148,7 +148,10 @@ static int CCONV InitialPass(void* inf, void* mf, int argc, char* argv[]) if (info->CAPI->GetTotalArgumentSize(2, args) != 13) { return 0; } - info->CAPI->ExecuteCommand(mf, "SET", 2, args); + + ccArgs[0] = "TEST_EXEC"; + ccArgs[1] = "TRUE"; + info->CAPI->ExecuteCommand(mf, "SET", 2, ccArgs); /* make sure we can find the source file */ if (!info->CAPI->GetSource(mf, argv[1])) { |