Commit Graph

2115 Commits

Author SHA1 Message Date
Amine Chadly 48ed48f7ad Add test to secure the file(GLOB empty) behavior. 2012-11-02 17:10:06 +01:00
Amine Chadly c2a6cb64af file: remove dead code
The file command requires at least two arguments, so guarding the GLOB and
MAKE_DIRECTORY command is not necessary. Changed it for an assert to keep the
protection.
2012-11-02 17:10:06 +01:00
Petr Kmoch 07251a8ea5 Consolidate list() argument count testing
Move test for list() argument count >= 2 to InitialPass().
2012-11-02 17:09:55 +01:00
Petr Kmoch 1b078c304d Add tests for list() invalid arguments
Add tests for error reporting when list() arguments are invalid.
2012-11-02 17:08:49 +01:00
Petr Kmoch f560977540 Add tests for list() argument count
Add test for error reporting when list() subcommands have wrong number of
arguments.
2012-11-02 17:08:44 +01:00
Rolf Eike Beer d211e5d203 CMakeTests: allow to call the check_cmake_test macro with a given file
This allows to generate a lot of simple files directly in the test tree instead
of having them all checked in.
2012-11-02 12:50:05 +01:00
Rolf Eike Beer 656afca978 FindQt: add to MajorVersionSelection test 2012-11-01 10:27:20 +01:00
David Cole fb190dfb9a Merge topic 'test-major-version'
d1f3bfe Tests: add MajorVersionSelection tests
2012-10-31 16:34:32 -04:00
David Cole b3927bce78 Merge topic 'generator-expression-bug-fixes'
4bacff7 GenEx: Test early determination of AND and OR
2012-10-31 16:33:46 -04:00
David Cole af304a1c6a Merge topic 'FindIcotool'
86a184d Add module FindIcotool
2012-10-31 16:33:15 -04:00
David Cole 6df05b93b1 Merge topic 'find_library-NAMES_PER_DIR'
66759ee find_library: Optionally consider all names in each directory
9cb68b1 find_library: Generalize helper macro in test case
b64dd76 find_library: Simplify framework search logic
531c71b find_library: Refactor internal name iteration
2012-10-31 16:32:41 -04:00
Rolf Eike Beer d1f3bfe50e Tests: add MajorVersionSelection tests
For things where we may have 2 major versions of the same software
installed in parallel (think of Qt and Python) make sure our version
selection gets this right.
2012-10-31 16:22:42 -04:00
David Cole 02b993b1ca Merge topic 'genex-validate-target-property-names'
e386992 GexEx: Validate Target names and property names differently.
95d590d GenEx: Create cmGeneratorTargets for imported targets.
0442104 GenEx: Add an accessor for imported targets in a makefile.
2012-10-23 16:37:56 -04:00
Stephen Kelly e386992152 GexEx: Validate Target names and property names differently.
In the unit test, use the same IMPORTED_LOCATION trick that
the ExportImport test uses.
2012-10-22 14:05:48 -04:00
Rolf Eike Beer a22f4fabb7 SelectLibraryConfigurations: fix for release and debug libs being the same 2012-10-21 15:24:25 +02:00
Rolf Eike Beer 5052fbc93d SelectLibraryConfigurations: add testcase 2012-10-21 15:17:20 +02:00
Stephen Kelly 4bacff7a4c GenEx: Test early determination of AND and OR
It should be possible for example to do this:

 "$<AND:${FOO},$<BOOL:${TGT}>,$<BOOL:$<TARGET_PROPERTY:${TGT},PROP>"

such that it works simliarly to the C code:

 if (foo && tgt && tgt->prop())
   {
   }

The example of generator expression code is a little bit contrived as
it could be written other ways with the same functionality. Nevertheless,
as these cases already work and are intentional, test for them.
2012-10-20 14:23:47 +02:00
David Cole 982905c0d2 Merge topic 'generator-expression-bug-fixes'
79edd00 GenEx: Fix reporting about not-found include directories and libraries.
f7ef32b GenEx: Replace some failing tests with Borland and NMake makefiles.
fd59b10 GenEx: Add some more asserts to verify code-sanity.
6dd2b36 GenEx: Break if there are no more commas in the container
e7230c7 GenEx: Fix termination bugs in generator expression parser.
145a4af GenEx: Test the use of generator expressions to generate lists.
e2d141d GenEx: Parse colon after arguments separator colon specially.
2012-10-17 16:44:44 -04:00
David Cole a2871e93ee Merge topic 'test-ctest-memcheck'
995a35f CTest: add a check with a quoted memory checker
de8bffc CTest: add a test for CTEST_CUSTOM_MEMCHECK_IGNORE
d26c9b6 CTest: improve memory checker type detection
fcae1da CTest: add tests that simulate memcheck runs
6187876 CTest: fix pre and post test commands with spaces
95bc8aa CTest: fix usage of memory checker with spaces in path
2012-10-17 16:43:02 -04:00
Stephen Kelly 79edd00235 GenEx: Fix reporting about not-found include directories and libraries.
This fixes a regression introduced in commit 290e92ad (Move
GetIncludeDirectories to cmGeneratorTarget, 2012-09-16) which loops over
cmGeneratorTargets before they get created, so the container is empty.
2012-10-17 16:23:32 -04:00
Stephen Kelly f7ef32b00b GenEx: Replace some failing tests with Borland and NMake makefiles.
The '<<' is a special sequence on those platforms, so it can't appear in
the test.
2012-10-17 16:21:13 -04:00
Stephen Kelly e7230c71fd GenEx: Fix termination bugs in generator expression parser.
Content which is incomplete as a generator expression could cause
segfaults by advancing an iterator beyond end() and dereferencing
it. Such incomplete generator expressions  should be treated as
plain text instead.
2012-10-17 16:21:12 -04:00
Stephen Kelly 145a4af8d3 GenEx: Test the use of generator expressions to generate lists.
We can't test this in the GeneratorExpression unit test because
the ';' chars are processed specically by the CMake function argument
parser.
2012-10-17 16:21:12 -04:00
Stephen Kelly e2d141d474 GenEx: Parse colon after arguments separator colon specially.
The rationale is similar to that in commit b3d8f5da (GenEx: Parse comma
after colon tokens specially, 2012-10-04), in that colon tokens should
not be parsed as identifier-argument delimiters after the first colon.
2012-10-17 16:20:42 -04:00
Aleksey Avdeev 86a184d8bb Add module FindIcotool
This module looks for icotool.

Signed-off-by: Aleksey Avdeev <solo@altlinux.ru>
2012-10-16 16:06:32 +04:00
Stephen Kelly 78e54b99fe GenEx: Add tests for "0" and "1" expressions with literal commas. 2012-10-09 08:26:54 -04:00
Stephen Kelly d729e8b74c GenEx: Add test for $<BOOL:> with empty parameter. 2012-10-09 08:26:51 -04:00
Stephen Kelly 8b3b88abd8 GenEx: Validate target and property names.
They must be non-empty, and match a restrictive regexp.
2012-10-09 08:26:45 -04:00
Stephen Kelly b3d8f5dab7 GenEx: Parse comma after colon tokens specially
Otherwise the comma is treated as plain text by ParseContent.

$<STREQUAL:,> should be valid and true.
$<STREQUAL:,something> should be valid and false.

$<STREQUAL:,,> should be non-valid as it is 3 parameters.
$<STREQUAL:something,,> should be non-valid as it is 3 parameters.

Additionally, this allows reporting the correct error for other
expressions. For example $<TARGET_PROPERTY:,> should be invalid
because it has an empty target and empty property. It shouldn't
attempt to read the property ',' on the 'implicit this' target.
2012-10-09 08:26:43 -04:00
Stephen Kelly a4985a9af9 GenEx: Report actual target name not found, not "0" each time. 2012-10-09 08:26:40 -04:00
Rolf Eike Beer 995a35fe12 CTest: add a check with a quoted memory checker 2012-10-04 23:07:31 +02:00
Rolf Eike Beer de8bffc8f8 CTest: add a test for CTEST_CUSTOM_MEMCHECK_IGNORE 2012-10-04 23:07:31 +02:00
Rolf Eike Beer fcae1dacea CTest: add tests that simulate memcheck runs 2012-10-04 23:07:31 +02:00
Brad King 49c7b649f9 Merge topic 'export-sets'
80112da Merge topic 'AutomocUseTargetProperties' into export-sets
955b966 exports: add a test for exporting dependent targets
6f50a04 exports: define a CMAKE_FIND_PACKAGE_NAME var set by find_package()
0cfd055 exports: move the handling of missing targets into subclasses
190f2c8 exports: fix build with MSVC6
8b5f448 exports: first try at error handling if a target is missing
87f4c01 exports: accept a missing target if it is exported exactly once
999061a exports: store pointers to all installations of each export set
64b3a6c exports: cmGlobalGenerator::ExportSets destructor will clear it
81cdab5 exports: Hold an ExportSet pointer in cm*Export*Generator
5c898fb exports: Add cmExportSetMap class
d13ec1a exports: Create class cmExportSet
4e2347c exports: Rename cmGlobalGenerator::AddTargetToExport{s,}
e846e70 exports: Remove cmTargetExport constructor
81c66c8 exports: Move cmTargetExport to a dedicated header file
ae4ab62 find_package: add support for a <package>_NOT_FOUND_MESSAGE variable
...
2012-10-01 14:05:35 -04:00
Brad King 7dce31f3d0 Merge topic 'vs-pdb-output'
2ccca05 Run PDBDirectoryAndName test on MSVC and Intel
efc83b3 Document that PDB_(NAME|OUTPUT_DIRECTORY) are ignored for VS 6
b294457 Verify that PDB_(NAME|OUTPUT_DIRECTORY) are honored in test
3f60dbf Add PDB_OUTPUT_DIRECTORY and PDB_NAME target properties (#10830)
2012-10-01 14:05:11 -04:00
Alex Neundorf 80112da54e Merge topic 'AutomocUseTargetProperties' into export-sets
Conflicts:
	Source/cmGlobalGenerator.h
2012-09-30 10:27:44 -04:00
Alex Neundorf 955b96629e exports: add a test for exporting dependent targets
The test exports two libraries into two separate exports,
and then include()s the generated export files. This must not fail.

Alex
2012-09-30 10:27:02 -04:00
Brad King 2ccca05fad Run PDBDirectoryAndName test on MSVC and Intel
Move it out of the condition that also accepts MinGW/MSYS.
Teach the test to allow the Intel for Windows compiler but
do not verify the results because the compiler does not
seem to write PDB output in all cases.
2012-09-29 07:17:42 -04:00
Brad King 103d99338a Merge topic 'generator-expression-target-properties'
083de7e Process generator expressions in the COMPILE_DEFINITIONS target property.
08cb4fa Process generator expressions in the INCLUDE_DIRECTORIES property.
0ef091d Early return if there is no target.
eb250cd Add a self-reference check for target properties.
7e80747 Add API to check that dependent target properties form a DAG.
239ac84 Add a generator expression for target properties.
e028381 Extend the generator expression language with more logic.
b8e61d6 Refactor GetCompileDefinitions a bit.
2c2b25b Return a std::string from GetCompileDefinitions.
b7e48e0 Add an AppendDefines std::string overload.
9a16087 Convert paths in INCLUDE_DIRECTORIES property to Unix slashes.
4557c8d Don't prepend a path before generator expressions in include_directories.
c6abc41 Add include guard for cmGeneratorExpression.
0ff4e3f Port remaining code to GetCompileDefinitions().
f178d53 Fix indentation in the code blocks generator.
2012-09-28 17:15:03 -04:00
Stephen Kelly 083de7ed35 Process generator expressions in the COMPILE_DEFINITIONS target property. 2012-09-28 08:50:16 -04:00
Stephen Kelly 08cb4fa4c0 Process generator expressions in the INCLUDE_DIRECTORIES property.
This use of generator expressions, like all others to come which operate
on target properties, must initalize the dag checker.
2012-09-28 08:50:10 -04:00
Stephen Kelly e028381bf1 Extend the generator expression language with more logic.
Generator expressions for comparing strings, evaluating
strings as booleans, and for creating literal right-angle-brackets
and commas are added. Those may be needed in some cases
where they appear in literals.
2012-09-28 08:49:21 -04:00
Brad King 66759eea5e find_library: Optionally consider all names in each directory
When more than one value is given to the NAMES option this command by
default will consider one name at a time and search every directory for
it.  Add a NAMES_PER_DIR option to tell this command to consider one
directory at a time and search for all names in it.
2012-09-25 17:08:08 -04:00
Brad King 9cb68b1cd4 find_library: Generalize helper macro in test case
In Tests/CMakeOnly/find_library/CMakeLists.txt generalize the
test_find_library macro and move the lib64 substitution logic to a new
test_find_library_subst macro.
2012-09-25 17:08:08 -04:00
Brad King efc83b369b Document that PDB_(NAME|OUTPUT_DIRECTORY) are ignored for VS 6 2012-09-25 15:23:35 -04:00
Brad King b294457e2b Verify that PDB_(NAME|OUTPUT_DIRECTORY) are honored in test
Teach the PDBDirectoryAndName test to check that the .pdb files appear
where expected.
2012-09-25 15:23:35 -04:00
Yuchen Deng 3f60dbf148 Add PDB_OUTPUT_DIRECTORY and PDB_NAME target properties (#10830)
This enables changing the name and output folder of the debug symbol
files produced by MS compilers.

Inspired-by: Thomas Bernard <thomas.bernard@ipetronik.com>
2012-09-25 15:23:35 -04:00
David Cole 021e66a25c Merge topic 'osx-sysroot-cleanup'
df92864 OS X: Ignore MACOSX_DEPLOYMENT_TARGET during Xcode compiler id
e7e613e OS X: Teach deployment target sanity check about SDK names
43b7479 OS X: Further improve default CMAKE_OSX_SYSROOT selection
2690738 OS X: If CMAKE_OSX_SYSROOT is already set do not compute default
7995722 OS X: Simplify selection of CMAKE_OSX_ARCHITECTURES
1786b12 OS X: Allow CMAKE_OSX_SYSROOT to be a logical SDK name
242f673 Tests/Assembler: Use CMAKE_OSX_SYSROOT to generate .s file
a1c032b bootstrap: Suppress CMAKE_OSX_SYSROOT if CFLAGS have -isysroot
230ea21 OS X: Improve default CMAKE_OSX_SYSROOT selection
a0a0877 OS X: Always generate -isysroot if any SDK is in use
33a60e6 Xcode: Remove unused code reading CMAKE_OSX_SYSROOT_DEFAULT
2012-09-25 15:18:24 -04:00
Brad King 242f673829 Tests/Assembler: Use CMAKE_OSX_SYSROOT to generate .s file
On OS X if the user-provided flags do not include -isysroot and
CMAKE_OSX_SYSROOT is defined then add the proper -isysroot flag to the C
compiler invocation we use to generate the .s file.
2012-09-21 11:15:23 -04:00
Brad King 95a0011604 file(DOWNLOAD): Change EXPECTED_HASH to take ALGO=value
Make the EXPECTED_HASH option take only a single value instead of two to
avoid handling sub-keyword arguments.  This is also consistent with
URL_HASH in ExternalProject.
2012-09-19 11:31:36 -04:00
Brad King d407dcdbc8 Merge topic 'generator-expression-refactor'
91011bd cmGeneratorExpression: Port users to two-stage processing
f1eacf0 cmGeneratorExpression: Re-write for multi-stage evaluation
2012-09-19 08:28:16 -04:00
Stephen Kelly f1eacf0e07 cmGeneratorExpression: Re-write for multi-stage evaluation
The expressions may be parsed and then cached and evaluated multiple
times.  They are evaluated lazily so that literals such as ',' can be
treated as universal parameter separators, and can be processed from
results without appearing literally, and without interfering with the
parsing/evaluation of the entire expression.
2012-09-18 17:02:23 -04:00
David Cole 893d84b221 Merge topic 'ExternalProject-check-hashes'
c266461 Add SSL_VERIFYPEER and CAINFO file options to ExternalProject_Add.
beb8a83 ExternalProject: Generalize URL_MD5 option to URL_HASH
2012-09-18 16:42:39 -04:00
David Cole 3e7fe5a7a0 Merge topic 'if-version-depth'
dfa0ebd if: Compare up to 8 components in VERSION tests
2012-09-18 16:41:59 -04:00
Brad King beb8a8309b ExternalProject: Generalize URL_MD5 option to URL_HASH
Add support for SHA algorithms.
2012-09-11 16:00:57 -04:00
Brad King dfa0ebd646 if: Compare up to 8 components in VERSION tests
Extend the number of components tested by

  if(... VERSION_LESS ...)
  if(... VERSION_EQUAL ...)
  if(... VERSION_GREATER ...)

from 4 to 8.  The latter is a more extreme maximum.
2012-09-11 15:59:16 -04:00
Bill Hoffman 34567dfc0d file(DOWNLOAD): Generalize EXPECTED_MD5 to EXPECTED_HASH
Add support for SHA algorithms.
2012-09-11 08:58:29 -04:00
Brad King 25b0d94678 Merge topic 'msvc-compiler-info'
16fa7b7 VS: Fix MSVC_IDE definition recently broken by refactoring
2012-08-31 07:24:53 -04:00
Brad King 16fa7b7395 VS: Fix MSVC_IDE definition recently broken by refactoring
In commit 485a940e (VS: Simplify MSVC version reporting, 2012-08-23) we
accidentally flipped the 0/1 values of MSVC_IDE.  Flip them back and
teach the CheckCompilerRelatedVariables test to check the variable.
2012-08-30 16:18:05 -04:00
Brad King 4f3436dd11 Merge topic 'fix-Qt-casing'
3252149 Fix casing of 'Qt' in docs, comments and user-visible strings.
2012-08-30 11:55:36 -04:00
Brad King a4c47fe0c7 Merge topic 'cmake-platform-info-version'
e5fee8a Store ABI detection results in compiler information files
3df81b4 Move CMAKE_<LANG>_COMPILER_WORKS to compiler information files
7195aca Make platform information files specific to the CMake version
2012-08-30 11:06:15 -04:00
Brad King 32b7c72623 Merge branch 'cmake-platform-info-version' into msvc-compiler-info
Conflicts:
	Modules/CMakeTestCCompiler.cmake
	Modules/CMakeTestCXXCompiler.cmake
	Modules/Platform/Windows-cl.cmake
2012-08-30 09:45:17 -04:00
Stephen Kelly 325214900b Fix casing of 'Qt' in docs, comments and user-visible strings.
QT (cue-tea) is Apple QuickTime.
Qt (cute) is the C++ framework.
2012-08-28 11:24:55 +02:00
David Cole 34a0284603 Merge topic 'ide-compiler-id'
403ead6 Document CMAKE_<LANG>_COMPILER_(ID|VERSION) values
8be51f6 Test variables CMAKE_(C|CXX|Fortran)_COMPILER(|_ID|_VERSION)
ec22a9b Cleanly enable a language in multiple subdirectories
66cb335 VS: Detect the compiler id and tool location
89595d6 VS10: Define CMAKE_VS_PLATFORM_TOOLSET variable
965a69d Xcode: Detect the compiler id and tool location
9a9e1ee CMakeDetermineCompilerId: Prepare to detect IDE compiler id
b8b5c83 Re-order C/C++/Fortran compiler determination logic
2012-08-24 14:25:40 -04:00
David Cole 05784dadc5 Merge topic 'compile-definitions-unique'
f0a1065 Rename files from main.cpp to more meaningful names.
ca7fb14 Fix the test setting COMPILE_DEFINITIONS target property
733deb6 Fix CompileDefinitions test on Visual Studio.
3dae652 Don't duplicate -D defines sent to the compiler.
2012-08-24 14:24:24 -04:00
David Cole bc147d99ca Merge topic 'test-ObjectLibrary-lang'
94c08b3 Tests/ObjectLibrary: Do not enable CXX in subdirectories
2012-08-24 14:23:33 -04:00
Brad King 7195aca54f Make platform information files specific to the CMake version
At the top of a build tree we configure inside the CMakeFiles directory
files such as "CMakeSystem.cmake" and "CMake<lang>Compiler.cmake" to
save information detected about the system and compilers in use.  The
method of detection and the exact results store varies across CMake
versions as things improve.  This leads to problems when loading files
configured by a different version of CMake.  Previously we ignored such
existing files only if the major.minor part of the CMake version
component changed, and depended on the CMakeCache.txt to tell us the
last version of CMake that wrote the files.  This led to problems if the
user deletes the CMakeCache.txt or we add required information to the
files in a patch-level release of CMake (still a "feature point" release
by modern CMake versioning convention).

Ensure that we always have version-consistent platform information files
by storing them in a subdirectory named with the CMake version.  Every
version of CMake will do its own system and compiler identification
checks even when a build tree has already been configured by another
version of CMake.  Stored results will not clobber those from other
versions of CMake which may be run again on the same tree in the future.
Loaded results will match what the system and language modules expect.

Rename the undocumented variable CMAKE_PLATFORM_ROOT_BIN to
CMAKE_PLATFORM_INFO_DIR to clarify its purpose.  The new variable points
at the version-specific directory while the old variable did not.
2012-08-24 10:52:23 -04:00
Brad King 8be51f6694 Test variables CMAKE_(C|CXX|Fortran)_COMPILER(|_ID|_VERSION)
Add tests CMakeOnly.CompilerId(C|CXX|Fortran) to check that the basic
compiler tool path, vendor, and version variables have been set as
expected.
2012-08-22 16:35:54 -04:00
Stephen Kelly f0a1065393 Rename files from main.cpp to more meaningful names.
Because the main file for the dummy-executable and the actual compile
test were both called main.cpp, they were overwriting each other during
in-source builds.
2012-08-22 13:05:07 +02:00
Stephen Kelly ca7fb14f9b Fix the test setting COMPILE_DEFINITIONS target property 2012-08-21 11:05:07 +02:00
Stephen Kelly 733deb66c6 Fix CompileDefinitions test on Visual Studio.
Avoid testing unsupported spaces in define values.
2012-08-21 11:04:09 +02:00
Stephen Kelly 3dae652b4e Don't duplicate -D defines sent to the compiler.
There is no need to do so. Be consistent with include directories and
ensure uniqueness.

This requires changing the API of the cmLocalGenerator::AppendDefines
method, and changing the generators to match.

The test unfortunately can't test for uniqueness, but it at least verifies
that nothing gets lost.
2012-08-20 22:30:11 +02:00
David Cole 407ccb4957 Merge topic 'RemoveNonworkingKDE4Test'
11f23fe remove non-working KDE4 test
2012-08-20 15:41:06 -04:00
David Cole e11e719796 Merge topic 'hg-modules'
91053cd ExternalProject: Add Mercurial (hg) repository support
ea5bfb1 Add FindHg module to find Mercurial
2012-08-20 15:40:19 -04:00
David Cole 9f555e805d Merge topic 'list-command-argument-fixes'
08c71ac CMake.List test: explicitely test with lists containing only an empty string
52d9c38 list command: error on too many arguments
2012-08-20 15:39:35 -04:00
David Cole 14c8096ba8 Merge topic 'more-endif-closing-style-cleanups'
84b49be Remove CMake multiline block-end command arguments
2012-08-20 15:39:26 -04:00
David Cole b7f3cc22c3 Merge topic 'xcode-asm'
97140d3 Tests/Assembler: Do not use assembler in universal binaries
f3477ed Xcode: Set ASM source language in project file (#13472)
2012-08-20 15:39:09 -04:00
David Cole 2582994e57 Merge topic 'clang-asm'
7e8471c Recognize Clang ASM support (#13473)
2012-08-20 15:38:51 -04:00
David Cole 3574bb4842 Merge topic 'generator-expression-conditions'
9d9f616 Add $<CONFIG:...> boolean query generator expression
ebf05ab Add boolean generator expressions
2012-08-20 15:38:42 -04:00
Brad King 94c08b368c Tests/ObjectLibrary: Do not enable CXX in subdirectories
In commit b237dbd8 (Xcode: Fix object library references in
multi-project trees, 2012-08-03) we accidentally enabled CXX in the
subdiretories of this test by invoking project() with only one argument.
The top-level directory of the test enables only C, so do this in the
subdirectories too.
2012-08-20 14:47:33 -04:00
Alex Neundorf 11f23fee52 remove non-working KDE4 test
Alex
2012-08-16 23:28:52 +02:00
Brad King 91053cdf7b ExternalProject: Add Mercurial (hg) repository support
Add options HG_REPOSITORY and HG_TAG to specify an external project
hosted in a Mercurial repository.  Teach ExternalProject to clone the
repository and update from it.  Extend the ExternalProject test to try a
Mercurial repository when hg is available.
2012-08-16 09:02:34 -04:00
Rolf Eike Beer 08c71acc87 CMake.List test: explicitely test with lists containing only an empty string 2012-08-15 23:05:05 +02:00
Marcin Wojdyr 84b49be8f0 Remove CMake multiline block-end command arguments
removing arguments omitted in 9db3116226
2012-08-15 16:50:29 -04:00
Brad King 97140d3986 Tests/Assembler: Do not use assembler in universal binaries
If CMAKE_OSX_ARCHITECTURES is set then the computed assembler .s source
file may not work for all architectures.  Skip it in that case.
2012-08-15 12:55:03 -04:00
Brad King 9d9f616792 Add $<CONFIG:...> boolean query generator expression
This expression evaluates to '1' or '0' to indicate whether the build
configuration for which the expression is evaluated matches tha named
configuration.  In combination with the "$<0:...>" and "$<1:...>"
expressions this allows per-configuration content to be generated.
2012-08-15 11:44:49 -04:00
Brad King ebf05abda1 Add boolean generator expressions
Add generator expressions that combine and use boolean test results:

 $<0:...>         = empty string (ignores "...")
 $<1:...>         = content of "..."
 $<AND:?[,?]...>  = '1' if all '?' are '1', else '0'
 $<OR:?[,?]...>   = '0' if all '?' are '0', else '1'
 $<NOT:?>         = '0' if '?' is '1', else '1'

These will be useful to evaluate (future) boolean query expressions and
condition content on the results.  Include tests and documentation.
2012-08-15 11:44:49 -04:00
Brad King f3477ed88c Xcode: Set ASM source language in project file (#13472)
Also teach the Assembler test to build under Xcode.

Suggested-by: Tobias Pape <tobiaspape@gmail.com>
2012-08-15 11:03:57 -04:00
Brad King 7e8471ce7b Recognize Clang ASM support (#13473)
Since commit 571dc748 (Recognize Clang C and C++ compilers, 2010-05-17)
we recognize Clang C and C++ support.  Add Compiler/Clang-ASM.cmake to
enable use of Clang for ASM too.  Also teach Assembler test to try Clang
as an assembler.

Suggested-by: Tobias Pape <tobiaspape@gmail.com>
2012-08-15 09:40:20 -04:00
Rolf Eike Beer c6fed68ef8 CheckTypeSize: add a test for size of struct members 2012-08-14 21:14:33 +02:00
Brad King ea5bfb1d25 Add FindHg module to find Mercurial
Also teach the CMakeOnly.AllFindModules to verify Hg version detection.
2012-08-14 10:41:17 -04:00
Brad King 3c0488d7d3 Fix WarnUnusedUnusedViaUnset test pass/fail regex
After conversion of Modules .cmake files to lower case the
FAIL_REGULAR_EXPRESSION for this test matched warnings in modules other
than the test line itself.  Make the pass and fail regular expressions
specific to the file containing the lines they are testing.
2012-08-14 08:06:19 -04:00
Kitware Robot 9db3116226 Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block.  This is no longer the preferred style.

Run the following shell code:

for c in else endif endforeach endfunction endmacro endwhile; do
    echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Kitware Robot 77543bde41 Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands.  Later command
names became case-insensitive.  Now the preferred style is lower-case.

Run the following shell code:

cmake --help-command-list |
grep -v "cmake version" |
while read c; do
    echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Kitware Robot 7bbaa4283d Remove trailing whitespace from most CMake and C/C++ code
Our Git commit hooks disallow modification or addition of lines with
trailing whitespace.  Wipe out all remnants of trailing whitespace
everywhere except third-party code.

Run the following shell code:

git ls-files -z -- \
 bootstrap doxygen.config '*.readme' \
 '*.c' '*.cmake' '*.cpp' '*.cxx' \
 '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \
 '*.mm' '*.pike' '*.py' '*.txt' '*.vim' |
egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' |
egrep -z -v '^(Modules/CPack\..*\.in)' |
xargs -0 sed -i 's/ \+$//'
2012-08-13 14:18:39 -04:00
David Cole c1163632de Merge topic 'xcode-object-dir'
b237dbd Xcode: Fix object library references in multi-project trees (#13452)
2012-08-13 13:28:07 -04:00
David Cole 85f843a7b4 Merge topic 'mixed-lib-to-lib64'
af80da3 remove lib64 Unix paths if the respective lib path is also given
733726e find_library: Fix mixed lib->lib64 (non-)conversion cases (#13419)
54add62 find_library: Simplify lib->lib<arch> expansion
6ca2f82 find_library: Refactor lib->lib64 conversion
1fe4b82 find_library: Add test covering lib->lib64 cases
2012-08-13 13:26:57 -04:00
Brad King b237dbd8c3 Xcode: Fix object library references in multi-project trees (#13452)
In cmGlobalXCodeGenerator::Generate we generate a .xcodeproj for each
directory in the tree containing a project() command.  First we
iteratively use SetGenerationRoot to add "ALL_BUILD" and other targets
to each project.  This leaves "CurrentProject" set to the last project
when we invoke cmGlobalGenerator::Generate, which is not the same as the
top-level project if any subdirectories invoke the project() command.

When cmGlobalGenerator::Generate reaches CreateGeneratorTargets it
constructs cmGeneratorTarget and calls ComputeTargetObjects exactly once
per target.  In this context the value of CurrentProject is undefined so
we cannot pass it to GetObjectsNormalDirectory.  Use "$(PROJECT_NAME)"
instead so it will adapt automatically to each project.

Also teach Tests/ObjectLibrary to cover this case.
2012-08-03 10:17:49 -04:00
David Cole a51e1529e7 Merge topic 'ninja-fix-macosx'
1fc8df9 Add missing this->.
7a3ecf5 Fix memory leak in Makefile generator.
9f7dc83 Ninja: also bootstrap ninja files
5d365b2 Ninja: enable ninja support everywhere
d569f3e Ninja: void function can't return a value
52160bf Ninja: enable ninja on Mac so all Mac CDash-builds are tested, cleanup later
56aeac6 Ninja: fixes for bcc
7a6bc9e Ninja: remove 'this' from member initializer list
44ba4cf Ninja: remove warnings
7751966 Ninja: remove 'friend' in ninja code
c3988ee Re-factor OS X content generator start up.
f8e0a51 Re-factor framework directory computation.
f36c7b0 Re-factor Mac OS X content directory computation.
5d885db Re-factor bundle content copying rules generation.
3b2a01e Ninja: Use same echo message as makefiles.
7bb56c5 Re-factor CFBundle generation.
...
2012-07-24 17:03:46 -04:00
David Cole c1bbdbff57 Merge topic 'DoNotInvokeCPackAtCMakeTime-forCMakeTests'
b47cffa CPack: Use bin subdir when looking for dpkg and rpmbuild
a8c659c Find dpkg and rpmbuild in usual Fink and MacPort paths
848f220 Do not run cpack at CMake time it is not available.
2012-07-24 17:03:37 -04:00