Commit Graph

84 Commits

Author SHA1 Message Date
Simon Butcher
1f60d13eea Merge remote-tracking branch 'public/pr/1648' into mbedtls-2.1 2018-06-17 18:03:13 +01:00
Azim Khan
c57d0e5ed5 Treat warnings as errors for IAR
Fix IAR compiler warnings

Two warnings have been fixed:
1. code 'if( len <= 0xFFFFFFFF )' gave warning 'pointless integer comparison'.
   This was fixed by wraping the condition in '#if SIZE_MAX > 0xFFFFFFFF'.
2. code 'diff |= A[i] ^ B[i];' gave warning 'the order of volatile accesses is undefined in'.
   This was fixed by read the volatile data in temporary variables before the computation.

Explain IAR warning on volatile access

Consistent use of CMAKE_C_COMPILER_ID
2018-06-14 08:48:49 +01:00
Darryl Green
4841767783 Change symlink to hardlink to avoid permission issues 2018-06-11 11:40:31 +01:00
Darryl Green
d866abe377 Fix out-of-tree testing symlinks on Windows 2018-06-11 11:40:20 +01:00
Ron Eldor
a8a7093f7e Check dynamically for cmake version
Chek dynamically for cmake option, for `fno-sanitize-recover`
2018-05-24 11:21:04 +03:00
Ron Eldor
b13a7833f2 Change the value of fno-sanitize-recover
Change the value of `-fno-sanitize-recover` from `undefined,integer` to `all`
2018-05-24 10:30:34 +03:00
Ron Eldor
e73c9cde94 Support only new CLang version
Support only new CLang version by enabling only
`-fno-sanitize-recover=undefined,integer`
2018-05-24 10:30:25 +03:00
Ron Eldor
de96fdd342 Address Azim's coments
Fix typo and use new check for clang>3.5m according to azim's comments
2018-05-24 10:30:17 +03:00
Ron Eldor
9f56d4fd24 Suport clang version 3.8
Check CLANG version, and according to the version,
set the correct paramters. fix for #1072
2018-05-24 10:30:09 +03:00
Gilles Peskine
61e396b597 Copy DartConfiguration.tcl, needed for make memcheck 2018-04-05 15:59:16 +02:00
Gilles Peskine
f22c59bc15 Fix some comments regarding what files are symlinked 2018-03-23 14:38:14 +01:00
Gilles Peskine
cd0265ec85 Support out-of-tree testing with CMake
Create extra symbolic links with CMake so that SSL testing (ssl-opt.sh
and compat.sh) works in out-of-tree builds.
2018-03-21 12:12:47 +01:00
Simon B
e2e2db4348 Fix config of compiler warning flags with MSVC
Compiler warnings were being configured twice and not suppressed on the
test suites with Microsoft Visual Studio.
2016-11-10 15:38:52 +00:00
Janos Follath
542ee5d8f3 Update default configuration
Change the default settings for SSL and modify the tests accordingly.
2016-03-07 16:34:25 +00:00
Manuel Pégourié-Gonnard
2134d25070 Use a full config.h with doxygen
Otherwise we get warnings that some documentation items don't have
corresponding #define, and more importantly the corresponding snippets are not
included in the output.

For that we need a modified version of the "full" argument for config.pl.

Also, the new CMakeLists.txt target only works on Unix (which was already the
case of the Makefile target). Hopefully this is not an issue as people are
unlikely to need that target on Windows.
2016-01-04 15:49:22 +00:00
Manuel Pégourié-Gonnard
824ba72442 Only use -Wshadow with GCC 4.8 or higher
Before that, we get useless warnings about local variables shadowing extern
functions, which means we can't have a local variable called index when we
include string.h.

https://lkml.org/lkml/2006/11/28/239
https://gcc.gnu.org/gcc-4.8/changes.html
2015-08-31 10:34:27 +02:00
Manuel Pégourié-Gonnard
ea35666f50 Fix -Wshadow warnings
Checked that it is supported by gcc 4.2.1 (FreeBSD 9).

fixes #240
2015-08-31 10:34:26 +02:00
Manuel Pégourié-Gonnard
c98204e68f Fix missing break in switch for SSL presets
closes #235
2015-08-11 04:21:01 +02:00
Manuel Pégourié-Gonnard
bcb0460224 Fix bug with cmake and old version of GCC 2015-07-19 16:00:04 +02:00
Manuel Pégourié-Gonnard
5871910490 cmake: testing disabled by default with MSVC
Previously testing was enabled only if GCC || Clang, and I though this was a
"proxy" for the likelihood of Perl being available. Apparently it was not just
that, since MSVC gives me a lot of errors when trying to build tests.

Let's fix them later, and disable for now.
2015-07-09 09:19:47 +01:00
Manuel Pégourié-Gonnard
0b4e2ac6f5 cmake: move options to the top 2015-07-08 22:10:38 +01:00
Manuel Pégourié-Gonnard
3d404b4763 Simplify some scripts
ssl-opt.sh and compat.sh can now be run from root too
2015-07-08 21:59:16 +01:00
Manuel Pégourié-Gonnard
4d2ef297cb Tests enabled by default with cmake on win32
People who don't have Perl will have to disable them manually.
That way they have an occasion to notice and install Perl.
2015-07-08 21:36:43 +01:00
Manuel Pégourié-Gonnard
3083053dd2 More cmake for windows tune-ups 2015-07-01 17:06:28 +02:00
Manuel Pégourié-Gonnard
5fe51d75f0 Don't rely on CMake 3.0 features
Too recent (about one year).
2015-07-01 16:59:56 +02:00
Manuel Pégourié-Gonnard
d3a9166afe Adjust prerequisites for tests in cmake 2015-07-01 10:08:08 +02:00
Manuel Pégourié-Gonnard
c8293b20a9 cmake: no reason for test to depend on gcc/clang 2015-06-25 10:59:57 +02:00
Manuel Pégourié-Gonnard
216a1831de Fix whitespace in CMakeLists.txt
- all spaces no tabs
- indent with 4 spaces everywhere
2015-06-25 10:59:57 +02:00
Manuel Pégourié-Gonnard
db5d15e227 Minor tune-ups in CMake 2015-06-25 10:59:56 +02:00
Manuel Pégourié-Gonnard
187ffb99eb Change "check" build mode to use -Os 2015-03-13 11:20:20 +00:00
Manuel Pégourié-Gonnard
9014b6f227 Rename project in CMake
TODO: to create symlinks to the old names!
2015-01-27 15:44:46 +00:00
Manuel Pégourié-Gonnard
afe8f53ead Fix error in lcov target 2015-01-23 17:40:33 +00:00
Manuel Pégourié-Gonnard
cfa9a45dd6 Rename in cmake help strings 2015-01-23 13:33:31 +00:00
Manuel Pégourié-Gonnard
f234ff82ec Rename doxyfile 2015-01-22 17:01:27 +00:00
Paul Bakker
d7e2483bfc Merge miscellaneous fixes into development 2015-01-13 16:04:38 +01:00
Manuel Pégourié-Gonnard
d68b65199f Fix previous commit
(worked with BSD sed but no GNU sed...)
2015-01-07 14:55:38 +01:00
Manuel Pégourié-Gonnard
3da751ea55 Allow flexible location of valgrind 2014-12-15 10:47:31 +01:00
Manuel Pégourié-Gonnard
98aa19148c Adjust warnings in different modes 2014-11-14 16:45:48 +01:00
Manuel Pégourié-Gonnard
705b70f122 Add new build modes for sanitizers 2014-11-13 13:35:50 +01:00
Manuel Pégourié-Gonnard
e9271e6835 Add a MemSan Cmake build type
Detects uninitialised memory reads. Available only with Clang on Linux x86_64
for now. Experimental but seems usable enough.
2014-11-12 00:01:52 +01:00
Manuel Pégourié-Gonnard
d6197a37e0 Detect undefined behaviours too in ASan builds 2014-11-12 00:01:51 +01:00
Manuel Pégourié-Gonnard
54f6e562e6 Fix CFLAGS with cmake and gcc 2014-11-12 00:01:51 +01:00
Manuel Pégourié-Gonnard
39141fed63 Add warnings in debug build, and -Werror with ASan
- warnings in debug build allows the to be caught earlier
- -Werror with ASan make tests/scripts/all.sh a bit shorter
2014-08-14 18:33:00 +02:00
Manuel Pégourié-Gonnard
31855456f9 Fix clang's check mode again 2014-06-25 15:59:50 +02:00
Manuel Pégourié-Gonnard
10a3891336 Add -Wmissing-prototypes to clang's check mode too 2014-06-25 12:49:54 +02:00
Manuel Pégourié-Gonnard
e41072e7f9 Exclude headers from lcov reports
The data produced by gcov for static inline functions is too unreliable to be
actually useful. Some lines that are covered are not marked as such, some
other static inline functions are completely ignored, and the reasons why do
not look obvious.
2014-06-23 11:54:57 +02:00
Manuel Pégourié-Gonnard
53c6e96ce7 Force lcov to notice files not covered at all 2014-06-23 11:52:59 +02:00
Barry K. Nathan
cf975f5988 Fix build with cc from Apple LLVM
On Xcode 4.x and above (I tested Xcode 4.6.3 on 10.7.5 and Xcode 5.5.1 on 10.9.2), cmake (2.8.12.2, whether from MacPorts or from clang.org, FWIW) is detecting /usr/bin/cc as Clang, but CMAKE_COMPILER_IS_CLANG is not getting set, so the tests aren't being built. (There may have been other build problems as well, but the fact that the tests weren't being built was by far the most obvious problem.)

Checking the compiler ID detected by cmake, rather than the name of the command used to invoke the compiler, fixes this.
2014-04-30 16:53:34 +02:00
Paul Bakker
27f1caed02 Add option to CMake to disable all tests 2014-04-30 16:31:54 +02:00
Manuel Pégourié-Gonnard
1827a6e77e Add -O1 to check mode (helps some warnings) 2014-03-27 21:10:56 +01:00