create add cmocka module from scratch#1368
create add cmocka module from scratch#1368vhvb1989 wants to merge 8 commits intoAzure:masterfrom vhvb1989:create-cmoka-test-cmake-module
Conversation
| @@ -0,0 +1,109 @@ | |||
| # Copyright (c) Microsoft Corporation. All rights reserved. | |||
There was a problem hiding this comment.
We should borrow from https://gitlab.com/cmocka/cmocka/-/blob/master/cmake/Modules/AddCMockaTest.cmake#L1 and modify as needed.
There was a problem hiding this comment.
I created one from scratch, with our specific needs (private access for tests to az_private, linker flags). So we should support and maintain our own version.
We don't support wine.
ahsonkhan
left a comment
There was a problem hiding this comment.
Why did we have to write our own?
|
Can you find if it is possible to pass compilation flags / CMAKE_BUILD_TYPE to cmocka, at the time cmocka itself gets built? This would remove the need to suppress libcmtd warning. |
antkmsft
left a comment
There was a problem hiding this comment.
As long as it does what we need, and is not very complicated, I'm not against the the idea of having our own.
|
If this PR goes after #1338, please make sure to NOT include the libcmtd warning suppression workaround. |
…-cmoka-test-cmake-module
…-cmoka-test-cmake-module
…-cmoka-test-cmake-module
Creating a cmake module that creates the cmocka tests exe binaries.
Removing the old cmake module that we were using as a modified version from 3rd party