summaryrefslogtreecommitdiffstats
path: root/Tests/FindPackageModeMakefileTest
Commit message (Collapse)AuthorAgeFilesLines
* Tests: Fix FindPackageModeMakefileTest with CMAKE_OSX_ARCHITECTURESBrad King2021-03-031-0/+3
|
* Tests: Generalize FindPackageModeMakefileTest extra flags varBrad King2021-03-032-9/+10
|
* Apple: also specify sysroot for linkingGregor Jasny2020-07-171-1/+1
| | | | | Otherwise the compiler/linker will default to the wrong C++ runtime library.
* FindPackageModeMakefileTest: macOS needs isysroot flagCraig Scott2019-10-282-1/+10
| | | | | | | macOS/Xcode no longer populate /usr/include. Building with the compiler directly instead of using /usr/bin/c++ can result in missing headers without the -isysroot flag. Relates: #19885
* FindPackageModeMakefileTest: Explicitly use C linkageChuck Atkins2018-08-292-0/+10
| | | | | | | This explicitly uses C linkage for the library code used by the test to work around some compilers (Solaris Studio 12.4) that implicitly assume incorrect linkage information. Since something else entirely is being tested here, this allows the test to proceed as needed on the affected platforms.
* cmake: Fix --find-package mode with imported targetsBrad King2017-08-291-0/+2
| | | | | | | | The change in commit v3.9.0-rc1~116^2~6 (cmakemain: use script role for -P, 2017-05-11) accidentally left project commands out of find-package mode, causing packages that provide imported targets to break. Fixes: #17124
* Test: Remove condition for CMake version no longer supportedStephen Kelly2016-10-101-10/+3
|
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-2/+2
| | | | | | | | | | | | | 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-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Add option to disable FindPackageModeMakefileTestBrad King2016-02-191-1/+2
| | | | | This test does not work in all environments, so add an option to disable it.
* Tests: Use consistent C++ flags FindPackageModeMakefileTestBrad King2015-10-011-2/+3
| | | | | | | Rather than using the CXXFLAGS environment variable in the make-only build, copy the CMAKE_CXX_FLAGS used to build the files on the CMake side. This will account for any changes made by CompileFlags.cmake or cache-provided flags.
* Remove .* expressions from beginning and end of MATCHES regexsRolf Eike Beer2014-04-141-1/+1
| | | | | | | | | All these expressions work the same: "foo" ".*foo.*" "^.*foo.*$" This assumes that the "Intel*" expressions were meant to be "Intel.*".
* Tests: Fix find-package mode test.Stephen Kelly2014-01-111-2/+2
| | | | | | | | The all target was depending on the clean and pngtest targets, but when running the tests with -jN, those can be executed out of order. Make the main.o target depend on the clean target instead to fix this.
* cmTarget: Deprecate the LOCATION target property with a policy.Stephen Kelly2013-10-112-3/+13
| | | | | | | | | | | | The final location and name of a build-target is not determined until generate-time. However, reading the LOCATION property from a target is currently allowed at configure time. Apart from creating possibly-erroneous results, this has an impact on the implementation of cmake itself, and prevents some major cleanups from being made. Disallow reading LOCATION from build-targets with a policy. Port some existing uses of it in CMake itself to use the TARGET_FILE generator expression.
* Fix FindPackageMode test Makefile (#13314)Daniel R. Gomez2012-06-191-3/+22
| | | | | | | | Use CXXFLAGS in the makefile's link rule since it invokes the C++ compiler front-end. Retool the makefile not to require GNU Make. Using backticks instead of $(shell ...) is safe so long as one guards against the possibility of backslashes getting inside the backticks, so use temporary files and shell variables to avoid them.
* Silence make on OpenBSD in FindPackageModeTest(#12508)Alex Neundorf2011-10-121-0/+1
| | | | | | | | | | BSD make doesn't use -v for printing its name and version, and so complains on stderr that this is a bad command line option, used in Tests/FindPackageModeMakefileTest/CMakeLists.txt . Silence stderr to make that ugly output go away. Patch by David Coppy. Alex
* Use $(CXXFLAGS) and $(LDFLAGS) in the --find-package test MakefileAlex Neundorf2011-08-181-2/+2
| | | | | | | This should make the test succeed in the coverage builds, where CXXFLAGS and LDFLAGS are set accordingly. Alex
* Only enable the test when using GNU makeAlex Neundorf2011-08-171-10/+20
| | | | | | | | | | | | The makefile used in the test uses $(shell ...), which is AFAIK a GNU extension, and will probably not work e.g. with OpenBSD make. According to the FreeBSD make manpage their make has a != assignment, which seems to do something similar, but I don't have such a system around for testing. Also, the point of this test is not to write a portable makefile, but to check whether cmake --find-package prints a correct string. Alex
* Make the test harder by always having a space in the include dirsAlex Neundorf2011-08-171-0/+1
| | | | | | | | | | | | The commit message for the previous commit was wrong, it should have been: fix the test by using $(shell ...) syntax instead of backticks in the Makefile. With backticks I couldn't get the quoting right. Printing -I"/some/path with space" did not work, the compiler complained that there is not file "with". Also backslashes in different numbers did not make it work. Alex
* Make the --find-package test harderAlex Neundorf2011-08-171-2/+2
| | | | | | | Now it is guaranteed that the include paths always contain a space. This should make the cont. build fail. Alex
* Much improved test, should now be executed on all UNIXesAlex Neundorf2011-08-166-17/+33
| | | | | | | | Instead of relying on that some development package is installed on the system, now a tiny library is built, which is the searched and used during the test. Alex
* Fix test on OpenBSD with BSD makeAlex Neundorf2011-08-151-1/+1
| | | | | | | | BSD make doesn't seem to support -C, so do not use it, According to the documentation the working directory is set to CMAKE_CURRENT_BINARY_DIR anyway, so it should work just the same. Alex
* The makefile for the test was kindof wrongAlex Neundorf2011-08-141-1/+3
| | | | Alex
* Only run the test if we are using a makefile generator under UNIXAlex Neundorf2011-08-111-1/+1
| | | | Alex
* Add a test for the new --find-package modeAlex Neundorf2011-08-113-0/+38
Alex