44 Commits

Author SHA1 Message Date
Rolf Eike Beer
b0f277db38 HP aCC: record compiler flag for Ansi C++98 support for version 3.80 onwards
Old versions of aCC need a special compiler flag to get full C++98 template
support as e.g. CMake itself or the Complex and ComplexOneConfig tests need.
The same versions need a special flag to get a proper C++ library, too.
2014-04-25 17:59:57 +02:00
Stephen Kelly
2410b912fe Merge some GenerateExportHeader subtests. 2013-12-15 11:22:19 +01:00
Stephen Kelly
4017db13aa Speed up the GenerateExportHeader unit test (#14453).
Instead of running many small tests with many cmake projects, simply
compare the generated export header against a reference.

Remove the helper macros and the try_compiles which are duplicates
of the library build tests.
2013-12-15 11:22:19 +01:00
Brad King
ff8917fdd2 Merge topic 'VISIBILITY_PRESET-property'
cd1fa53 Add a COMPILE_OPTION for a VISIBILITY_INLINES_HIDDEN target property.
0e9f4bc Introduce target property <LANG>_VISIBILITY_PRESET
2013-06-05 09:38:59 -04:00
Stephen Kelly
cd1fa537a0 Add a COMPILE_OPTION for a VISIBILITY_INLINES_HIDDEN target property.
This corresponds to the g++ and clang++
option -fvisibility-inlines-hidden on linux. On Windows with MinGW,
this corresponds to -fno-keep-inline-dllexport. That option is
not supported by clang currently.
2013-06-02 12:00:51 +02:00
Stephen Kelly
0e9f4bc00c Introduce target property <LANG>_VISIBILITY_PRESET
This is initialized by CMAKE_<LANG>_VISIBILITY_PRESET. The target
property is used as the operand to the -fvisibility= compile option
with GNU compilers and clang.
2013-06-02 12:00:51 +02:00
Brad King
6aba976427 Merge topic 'geh-cleanup-identifiers'
7e24997 GenerateExportHeader: Generate only C identifiers as defines
2013-05-24 09:20:20 -04:00
Brad King
dc85291c57 Merge topic 'geh-add-missing-test'
74f24b2 Tests/Module/GenerateExportHeader: Test exported free-function
2013-05-24 09:19:43 -04:00
Stephen Kelly
7e24997fed GenerateExportHeader: Generate only C identifiers as defines
The variables in this module are used to configure a header file
with defines whose name depends on the name of the target.

As valid names of targets may be invalid for use as defines, convert
the names of the defines used to C identifiers first. This is already
done in C++ code for the DEFINE_SYMBOL property.

This is not as simple as ensuring that the BASE_NAME is a C identifier,
because most of the define names are configurable, and because use of
a BASE_NAME which is not a C identifier, such as 4square can become a
C identifier by specifying a prefix in the generate_export_header
macro.
2013-05-24 09:09:43 -04:00
Stephen Kelly
74f24b2842 Tests/Module/GenerateExportHeader: Test exported free-function 2013-05-24 09:04:35 -04:00
Stephen Kelly
bb412d009a GenerateExportHeader: Add newlines to separate the compiler output.
Make the error logs more readable.
2013-05-23 07:47:25 +02:00
Rolf Eike Beer
0541a03a4c GenerateExportHeader test: add newlines before end of file 2012-01-18 00:01:08 +01:00
Stephen Kelly
08271ec7d3 Build each library only once instead of once for each test. 2011-10-09 17:41:47 +02:00
Stephen Kelly
c83cfd7a01 Remove unused define. 2011-10-09 17:39:24 +02:00
Stephen Kelly
93d8d1992e Add some more unit tests. 2011-09-02 10:18:24 +02:00
Stephen Kelly
36d28f2e6b Fix Compiler id variable name. 2011-08-24 20:21:30 +02:00
Stephen Kelly
99b2aabd46 Disable the tests for Watcom.
They are timing out and showing up on the dashboard.
2011-08-24 19:58:00 +02:00
Stephen Kelly
7ac0ab1f88 Quote paths in case there is a space in one of them. 2011-08-24 19:50:31 +02:00
Stephen Kelly
e253348ecd Possibly fix test on HPUX. 2011-08-23 19:49:52 +02:00
Stephen Kelly
10d8c446d5 Disable testing of deprecated macros.
It is not possible to test for it sanely across multiple ancient
compilers supported by cmake.
2011-08-14 15:45:36 +02:00
Stephen Kelly
c41c68bfa4 Try to error on deprecated on Intel and SunCC. 2011-08-13 23:49:17 +02:00
Stephen Kelly
c448b09ad3 Perform the -Werror test only once.
This way, the output of the test should be visible on CDash.
2011-08-13 22:57:55 +02:00
Stephen Kelly
fb88c6e32a Add some messaging output to make remaining issues findable. 2011-08-12 11:39:21 +02:00
Stephen Kelly
01e9e983e3 Test -Werror instead of enabling it per compiler.
Maybe the Intel compiler supports it too.
2011-08-12 10:47:08 +02:00
Stephen Kelly
9aab2aa77f Expect the tests to pass if hidden visibilty is not enabled. 2011-08-12 10:42:16 +02:00
Stephen Kelly
856bdb317b Don't change the expected build result based on the platform.
Hopefully the compiler feature tests will cover those cases.
2011-08-12 00:30:31 +02:00
Stephen Kelly
e1f7ee3de7 Test for compiler features, instead of for specific platforms. 2011-08-11 19:06:23 +02:00
Stephen Kelly
9554e1013e Split the deprecated available check from setting macro values. 2011-08-11 18:17:12 +02:00
Stephen Kelly
1590d5fe4f Don't export methods on already exported classes.
This is always a mistake.
2011-08-11 10:55:12 +02:00
Stephen Kelly
1c6b41bee7 Remember to surround the other deprecated test in the Borland check. 2011-08-11 00:19:53 +02:00
Stephen Kelly
3f7e03643d Export deprecated free methods too.
That way they can be linked to even after being deprecated.
2011-08-11 00:18:33 +02:00
Stephen Kelly
7924c1d6a8 Another attempt at fixing Borland.
Apparently it still needs to be exported, but only declspec(deprecated)
does not work.
2011-08-10 22:19:39 +02:00
Stephen Kelly
b4434591fb Use the correct project name compiletest not compilefail
Should fix windows VS solution based builds.
2011-08-10 21:50:06 +02:00
Stephen Kelly
cff9493598 Only set the COMPILER_HAS_HIDDEN_VISIBILITY if GCC >= 4.2
Hearsay has it that before that version it didn't work properly.

Hopefully this will fix more dashboard builds.
2011-08-10 21:14:46 +02:00
Stephen Kelly
af443b830b Set the CMAKE_RUNTIME_OUTPUT_DIRECTORY for windows builds. 2011-08-10 21:01:42 +02:00
Stephen Kelly
61726f867e Only run the failure tests with gcc >= 4.2 2011-08-10 15:17:01 +02:00
Stephen Kelly
002ddf253c Fix typo and tests failing as a result. 2011-08-10 14:58:00 +02:00
Stephen Kelly
44430379b7 Fix tests with clang. 2011-08-10 13:43:48 +02:00
Stephen Kelly
ffaa127b19 Test expected no-op instead of aborting the build.
Aborting causes make clean to fail if the executable is not created.
2011-08-10 11:54:35 +02:00
Stephen Kelly
6aca0e257b Short-circuit the tests on unsupported compilers. 2011-08-10 10:41:38 +02:00
Stephen Kelly
706ed2b1b0 Add a newline at the end of the file.
Hopefully fix the test execution reported on CDash.
2011-08-09 15:02:48 +02:00
Stephen Kelly
8963716615 Add a newline at the end of the file.
Hopefully fix the test execution reported on CDash.
2011-08-09 00:18:00 +02:00
Stephen Kelly
def0a54e0a Handle the case where the user changes the DEFINE_SYMBOL property.
This eases porting of KDE code.
2011-08-08 02:08:10 +02:00
Stephen Kelly
30880707c0 Add the GenerateExportMacro with unit tests.
Reviewed-by: Marcus D. Hanwell <marcus.hanwell@kitware.com>
2011-08-07 18:33:47 +02:00