summaryrefslogtreecommitdiff
path: root/tests/test-pedantic-compilation.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Define main function as "int main(void)" (with void)Hans Ulrich Niedermann2022-11-111-1/+1
|
* tests: declare local variable localHans Ulrich Niedermann2021-10-261-0/+1
| | | | | | | Declare local variable local by declaring it static. This avoids the clang warning about the variable not being declared static.
* tests: include system headers before gphoto2 headersHans Ulrich Niedermann2021-10-261-2/+2
| | | | | In the pedantic compilation tests, include the system headers before gphoto2 headers - which should be the way to do things.
* Make sure both C and C++ programs including gphoto2 headers compileHans Ulrich Niedermann2020-02-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Check that programs including libgphoto2 headers compile when compiled for a number of different language standards: C: ansi c99 c11 C++: ansi c++98 c++11 c++14 c++17 For each of these language standards, if the compiler does not compile an empty example program, we do not test whether compiling with the gphoto2/*.h headers included works. This will work with GCC as the compiler, and also should work with CLANG as the compiler as CLANG is mostly compatible in these matters. On other compilers, the test compile of the empty program should fail, and thus no checks with the gphoto2/*.h headers included will be performed. C90/ANSI C apparently does not define __STDC_VERSION__, so the C source code needed to be changed to become ANSI C compatible. In C++ pedantic compilation source, we now use actual C++ code instead of relying on C code working when compiled as C++ code. In Travis CI, we now actually require both C and C++.
* make sure that the pedantic compilation tests workHans Ulrich Niedermann2006-12-291-0/+5
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9768 67ed7778-7388-44ab-90cf-0a291f65f57c
* Use _GPHOTO2_INTERNAL_CODE to compile internal code, put GP_DEBUG there.Hans Ulrich Niedermann2006-10-041-9/+0
| | | | | | | | | | | | * GP_DEBUG now is only available if _GPHOTO2_INTERNAL_CODE is defined. * _GPHOTO2_INTERNAL_CODE is defined via AM_CPPFLAGS, so all code should be compiled correctly. * Users of GP_DEBUG external to the gphoto project should use something else. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9265 67ed7778-7388-44ab-90cf-0a291f65f57c
* cheat about variadic macros in C++ pedantic compilationHans Ulrich Niedermann2006-10-031-0/+9
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9259 67ed7778-7388-44ab-90cf-0a291f65f57c
* add gphoto2-port header filesHans Ulrich Niedermann2006-10-031-0/+7
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9253 67ed7778-7388-44ab-90cf-0a291f65f57c
* compile C++ pedantic test case, add more header filesHans Ulrich Niedermann2006-10-031-0/+7
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9252 67ed7778-7388-44ab-90cf-0a291f65f57c
* add pedantic compilation test casesHans Ulrich Niedermann2006-10-031-0/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9251 67ed7778-7388-44ab-90cf-0a291f65f57c
* add pedantic compilation test casesHans Ulrich Niedermann2006-10-031-0/+6
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9250 67ed7778-7388-44ab-90cf-0a291f65f57c