Hi,
I want to use Gtest for some unit tests on a number of the C functions that
comprise my C executable. However, Gtest ( And gMock ) are C++ testing
frameworks.
What I would like to have is a project for my exe and then a separate
project for my C++ library and be able to change the source pro
Whether what you want exactly is possible I dont know. If you are just
wanting your C++ test library to be able to test your C source then I would
still let them compile as C and just extern āCā { #include }.
When it gets linked all together it should be fine. This is how I usually
do testing of m
No.
CMake tracks each source file name exactly once. If you set properties on
it, it will be treated that way always. Have to make a copy of the source
to cpp...
copies to cmake_binary_dir/
plusplus_file_dup is the resulting list
( https://github.com/d3x0r/SACK/blob/master/CMakeLists.txt#L655 )
As stated CMake tracks source files globally so they can only have a single
language.
Project that I work on have migrated over to using file(GENERATE) to
produce the files as it only
requires a couple lines of CMake code.
get_filename_component(c_fname "${c_source_file}" NAME_WE)
get_filename_co