summaryrefslogtreecommitdiffstats
path: root/Tests/MFC
Commit message (Collapse)AuthorAgeFilesLines
* Revise include order using clang-format-6.0Kitware Robot2019-10-011-4/+3
| | | | | 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-format: Normalize headers presentationMarc Chevrier2019-10-015-0/+10
| | | | | | | | | | | | | | | | | By using clang-format directives 'IncludeBlocks' and 'IncludeCategories' headers are regrouped by categories: 1. "cmConfigure.h" which must be first 2. header matching current implementation file 3. standard language headers 4. CMake replacement ones 5. external headers (i.e. #include directive with '<' and '>') 6. Qt headers 7. cmsys/* headers 8. cm_* headers 9. CMake headers (i.e. starting with 'cm[A-Z]') 10. all other headers Fixes: #19674
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-018-41/+46
| | | | | | | | | | | | 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.
* Avoid CRLF newlines in Git repo blobsBrad King2017-08-302-237/+237
| | | | | | | | In commit 8ed03baa76 (gitattributes: prefer `eol=crlf` to `-crlf`, 2017-08-23) we left a few CRLF blobs in the repository. Some Git versions get confused by text files with CRLF blobs. Convert them to LF blobs. Use the `eol=crlf` attribute to tell Git to use CRLF on checkout.
* gitattributes: prefer `eol=crlf` to `-crlf`Ben Boeckel2017-08-231-6/+0
| | | | | | The `crlf` attribute is deprecated in Git. This also changes the given files to be in the index using LF newlines, but they will be checked out with CRLF newlines due to the attribute.
* FindMFC: Check for static MFC variantRich Chiodo2017-07-061-0/+5
| | | | | Some CMake applications can set /MT without setting CMAKE_MFC_FLAG. This change lets FindMFC work in those situations.
* Revise C++ coding style using clang-formatKitware Robot2016-05-1612-299/+267
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * 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.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-292-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort include directives within each block (separated by a blank line) in lexicographic order (except to prioritize `sys/types.h` first). First run `clang-format` with the config file: --- SortIncludes: false ... Commit the result temporarily. Then run `clang-format` again with: --- SortIncludes: true IncludeCategories: - Regex: 'sys/types.h' Priority: -1 ... Commit the result temporarily. Start a new branch and cherry-pick the second commit. Manually resolve conflicts to preserve indentation of re-ordered includes. This cleans up the include ordering without changing any other style. Use the following command to run `clang-format`: $ git ls-files -z -- \ '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | egrep -z -v '(Lexer|Parser|ParserHelper)\.' | egrep -z -v '^Source/cm_sha2' | egrep -z -v '^Source/(kwsys|CursesDialog/form)/' | egrep -z -v '^Utilities/(KW|cm).*/' | egrep -z -v '^Tests/Module/GenerateExportHeader' | egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' | xargs -0 clang-format -i This selects source files that do not come from a third-party. Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
* Tests: Stabilize include order in MFC, VSXaml, and VSWinStorePhoneBrad King2016-04-295-0/+6
| | | | | | These tests use a precompiled header that must be included first. Include the header in an isolated block so that tools that sort includes do not move it.
* Tests: Only really run MFC test if we can build MFC apps (#11213)David Cole2011-12-161-0/+15
| | | | Avoid problems on "undetected" VS Express build environments.
* Tests: Nudge MFC test to pass on VS 6 dashboards (#11213)David Cole2011-11-092-4/+12
| | | | | | | | | | | | | | | | | InstallRequiredSystemLibraries does not install any dlls when used with VS 6 dashboards. Modify the ValidateBuild script to expect only 1 file when building with VS 6. Using "-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>" does not work when <INSTALL_DIR> evaluates to a long enough string. However, using "-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>" does work, even with the longer strings. So: make sure to include the ":PATH" when using this construct with ExternalProject calls so that they may install to the proper location on VS 6 builds. All existing calls that match "CMAKE_INSTALL_PREFIX.*INSTALL_DIR" include the ":PATH" after this commit. By the way: https://twitter.com/DLRdave/status/134339505397309440
* Tests: Add environment logging to the MFC test (#11213)David Cole2011-11-081-0/+11
| | | | Simply to ease analyzing still-occurring dashboard failures.
* Tests: Fix MFC test to work with VS 10 and later (#11213)David Cole2011-11-041-0/+15
| | | | | | | | | | | The mfc app in the test was generated by the VS 7.1 wizard, and due to changes in VS since then, the values used for WINVER and _WIN32_WINNT caused compile errors when built with VS 10 or later. Change them to values appropriate for targeting Windows XP or later when building with VS 10 or later. See http://msdn.microsoft.com/en-us/library/6sehtctf.aspx for more info.
* Tests: Fix MFC test for old vs6 dashboards (#11213)David Cole2011-11-031-1/+7
| | | | | | | | The MFC test's mfc1 directory was a "VS-MFC-wizard-generated" starter MFC app, using VS 7.1 as the generator. There's one define used in the generated rc file that was not available back in the VS6 days... Put a conditional define in here based on _MSC_VER to enable the test app to build on VS6 dashboards.
* Tests: Fix MFC test w/ Make-based generators (#11213)David Cole2011-11-021-0/+12
| | | | | An explicit add_definitions of _AFXDLL is required for shared library builds with non-Visual Studio generators.
* Tests: Add the MFC test (#11213)David Cole2011-11-0127-0/+1705
Build a simple, do-nothing VS 7.1 MFC wizard generated app with CMake. Build it two different ways via ExternalProject, one with CMAKE_MFC_FLAG set to 1 for linking to MFC statically, and one with CMAKE_MFC_FLAG set to 2 for linking to the shared MFC dlls. Validate that the install tree of the static build has only one *.exe file in it and nothing else. Also validate that the install tree of the shared library build has multiple files in it (no less than 3) and that they are only of the expected types *.exe, *.dll and *.manifest. This commit does not address the issue reported in #11213, it merely adds a test that may be used to show that the bug report is valid. After this commit, the MFC test should fail on any dashboard machines that have MSVC defined, but cannot build an MFC app. We can then analyze that failure data as input to solving the issue.