summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GenerateExportHeader
Commit message (Collapse)AuthorAgeFilesLines
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-5/+5
| | | | | Run the `clang-format.bash` script to update our C and C++ code to a new include order `.clang-format`. Use `clang-format` version 6.0.
* Clang: For MSVC ABI do not use modes older than C++14Brad King2019-07-241-5/+0
| | | | | | | | | | | | | | | | | | | | Since commit d44c0db0b2 (clang: setup correct configuration in gnu mode, 2019-02-20, v3.15.0-rc1~41^2~5) we support the GNU-like Clang that targets the MSVC ABI. However, Clang cannot compile with the MSVC standard library unless it runs in a mode aware of C++14 (since MSVC itself does not even have a lower mode). When `CMAKE_CXX_STANDARD` is set to 98 or 11, use C++14 anyway. Since Clang's default mode is aware of C++14, another option is to not add any flags for 98 or 11. However, if a future Clang version ever defaults to a higher C++ standard, setting the standard to 98 or 11 should at least not use a mode higher than 14. Also revert test updates from commit 4819ff9647 (Tests: fix failures with gnu mode clang on windows, 2019-03-21, v3.15.0-rc1~41^2~3) that were meant to work around the standard selection problem. Fixes: #19496
* Tests: fix failures with gnu mode clang on windowsZsolt Parragi2019-05-241-0/+5
| | | | | | | | | Root causes were: * Using incorrect conditions (assuming MSVC-like command line mode) * Trying to compile the MSVC STL in C++11 mode, when parts of it require C++14 or enabling MS extensions in clang. * Missing flush in a testcase using stdout in a dll and a main part with static crt
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-1/+1
| | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 6.0. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* clang-format.bash: update to clang-format-6.0Brad King2018-06-011-1/+1
| | | | | | | | | | | | Update `.clang-format` with configuration to make the 6.0 format as close as possible to what 3.8 produced before. Then revise the style: * Indent preprocessor directives (a feature new since 3.8) * Add a newline and indentation before inheritance `:` and `,` Rename the Git attribute identifying the format to include the clang-format version number: `format.clang-format-6.0`. This will aid external infrastructure in knowing what version of the tool to run.
* GenerateExportHeader: add release notes, tests for include guard changesKyle Edwards2018-01-2319-14/+46
|
* GNU: Use -fvisibility on AIX when supportedBrad King2018-01-121-1/+10
| | | | | | | | | Revise the logic from commit v3.7.0-rc1~173^2~2 (GNU: Do not use -fvisibility on AIX or HP-UX, 2016-09-03) to add a version check. The GCC 7 release notes [1] state that visibility support has been added for AIX 7.1 and above. [1] https://gcc.gnu.org/gcc-7/changes.html
* Tests: Remove redundant code from RunCMake.GenerateExportHeader caseBrad King2018-01-122-4/+0
| | | | | Drop extra `add_compiler_export_flags` calls from subdirectories because it is already called in the top-level directory before entering them.
* GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in TestsCraig Scott2017-12-291-1/+1
|
* HP-UX: Drop support for building CMake on HP-UXBrad King2017-08-071-7/+0
| | | | | | | | CMake will soon require both C++11 and libuv to build. Neither of these works on HP-UX, so unfortunately we need to drop support for the platform until someone can get them working. Issue: #17137
* GenerateExportHeader: always fill in _EXPORT macrosBen Boeckel2017-03-161-1/+1
| | | | | | | | | | The `_EXPORT` and `_NO_EXPORT` macros should always be made properly because the `<LANG>_VISIBILITY_PRESET` properties are controlled independently of this module. One case where this breaks compatibility is where a project was setting `USE_COMPILER_HIDDEN_VISIBILITY=OFF` and then marking a symbol used outside of the library with `_NO_EXPORT` which is a contridiction.
* clang-format.bash: Use Git attributes to mark files for formattingBrad King2017-02-221-0/+2
|
* Tests: Refactor GenerateExportHeader test codeMatthew Woehlke2016-09-127-237/+327
| | | | | | | | | | | | | | Refactor the library code used in the GenerateExportHeader test to use an improved naming convention that more directly identifies what it being tested, making use of namespaces to avoid possible symbol collisions. This also eliminates duplicate cases such as `libshared()` and `libshared_not_exported()` which had the same decoration, and adds consistent pairings of <name>_EXPORT and <name>_DEPRECATED_EXPORT which were missing previously. The data tests from the previous commit are also added to `libstatic` and `libshared_and_static` for consistency. Note that there are no exported members of exported classes, as these are not allowed on Windows.
* Tests: Add data symbols to GenerateExportHeader testMatthew Woehlke2016-09-123-0/+74
| | | | | | Add static data members and global variables to the GenerateExportHeader shared library, testing that export decoration for these works in addition to decoration of classes and free functions.
* Tests: Add failure test for GenerateExportHeaderMatthew Woehlke2016-09-126-18/+96
| | | | | | | | | | | | | | | | | | | | | | Modify notation of statements in the GenerateExportHeader test expected to result in link errors. Modify script used to build the test to also generate a suite of modified sources, each having exactly one of the failing lines enabled, and to generate EXCLUDE_FROM_ALL executables for the same. Modify RunCMake script used to drive the test to read the list of such executables and try to build each of them, verifying that they do in fact fail to build. This will verify that the _NO_EXPORT macros are working as expected, and will also catch errors like the one that commit 0cbaaf2d (GenerateExportHeader: Fix add_compiler_export_flags regression, 2016-09-01) fixed. When setting up the failure tests for GenerateExportHeader, check if the compiler actually hides non-exported stuff. If not, the failure tests won't fail, and will cause the overall test to fail. Since this typically is only the case for very old compilers, simply skipping them as opposed to trying to do something more fine grained seems reasonably safe.
* Tests: Cleanup RunCMake.GenerateExportHeader somewhatBrad King2016-09-0511-51/+14
|
* Tests: Port GenerateExportHeader test to RunCMake infrastructureBrad King2016-09-0538-0/+1553
This will allow build failure cases to be added later.