Commit Graph

13323 Commits

Author SHA1 Message Date
David Cole cba1dd59fd Better error message tells user possible ways to resolve the error. 2009-09-18 12:56:49 -04:00
Zach Mullen 78e0bfa0fd Added test coverage for ctest. Covers WILL_FAIL condition, tests that do not build, tests that segfault, and test executable not found (bad command), as well as some pass and fail regular expressions. 2009-09-18 12:16:46 -04:00
Bill Hoffman 311eb30672 Fix the build for version 2.5 of Xcode. 2009-09-18 10:28:28 -04:00
Brad King 997ae66cbb Fix CHECK_(C|CXX)_COMPILER_FLAG macro test
The flag "-_this_is_not_a_flag_" was not rejected by GCC 4.0 on older
Mac OS X.  We now use "---_this_is_not_a_flag_" instead, which will
hopefully be rejected by all compilers.
2009-09-18 09:49:51 -04:00
Brad King 83957d9e0d Fix CHECK_(C|CXX)_COMPILER_FLAG for XL and SunPro
These compilers warn and return 0 for unrecognized flags.  We fix the
compiler flag check macros by looking for a warning in the output.  We
also update the regex for GNU on older Macs.  See issue #9516.
2009-09-18 09:49:44 -04:00
KWSys Robot b872d09ea2 KWSys Nightly Date Stamp 2009-09-18 00:01:06 -04:00
Brad King 53fb07ef5d Fix CHECK_(C|CXX)_COMPILER_FLAG for HP
This compiler warns and returns 0 for unrecognized flags.  We fix the
compiler flag check macros by looking for a warning in the output.
See issue #9516.
2009-09-17 17:16:43 -04:00
Bill Hoffman 6362d4c743 Fix case where no archs are found on older macs. 2009-09-17 16:09:52 -04:00
Brad King 42857c747e Test CHECK_(C|CXX)_COMPILER_FLAG macros
This teaches the TryCompile test to check that the compiler flag check
macros correctly reject a bad flag.  See issue #9516.
2009-09-17 15:33:12 -04:00
Brad King 7e3d437d0a Fix CHECK_(C|CXX)_COMPILER_FLAG for GNU and MSVC
These compilers warn and return 0 for unrecognized flags.  We fix the
compiler flag check macros by looking for a warning in the output.
See issue #9516.
2009-09-17 15:32:54 -04:00
Brad King ca76645ab7 Add FAIL_REGEX to CHECK_(C|CXX)_SOURCE_COMPILES
This teaches the CHECK_C_SOURCE_COMPILES and CHECK_CXX_SOURCE_COMPILES
macros to recognize a FAIL_REGEX option.  If they see the regular
expression in the output of the test compilation, the check fails.
2009-09-17 15:29:01 -04:00
Brad King 80af3ae35d Cleanup generic compiler check macro documentation
This commit improves formatting and style of the documentation for the
general-purpose compiler check macros:

  CHECK_C_COMPILER_FLAG
  CHECK_C_SOURCE_COMPILES
  CHECK_C_SOURCE_RUNS
  CHECK_CXX_COMPILER_FLAG
  CHECK_CXX_SOURCE_COMPILES
  CHECK_CXX_SOURCE_RUNS

This sytle is more consistent with CMake command documentation.
It also looks nicer in the generated documentation text files.
2009-09-17 15:28:51 -04:00
Alexander Neundorf 308e972412 The check for include dirs and builtin macros also works with the Intel compiler
Alex
2009-09-17 13:08:35 -04:00
Bill Hoffman ea282284d5 Fix for bug #9466. Change the implementation of OSX arch lists. If no ARCHs are specified by the user then no flags are set. We no longer use CMAKE_OSX_ARCHITECTURES_DEFAULT. 2009-09-17 11:53:02 -04:00
Bill Hoffman 8e8c9b7242 Bug #9430, recognize the FR flag 2009-09-17 09:18:21 -04:00
Brad King c87a35a326 Do not call CollapseFullPath for PDB file names
Some vendor tools convert PDB file names given on the command line to
lower-case before creating the file.  When CMake places a mixed-case PDB
file name into the build system, the file does not exist the first time
and it is written with mixed case.  After the first build though the
native tool has created a lower-case version of the file.  If CMake does
CollapseFullPath again, the file exists so the actual-case lookup gets
the lower-case name.  This causes the build files to change so the
project rebuilds.

The solution is to avoid calling CollapseFullPath for files generated by
the build.  In the case of PDB files we already construct them from
paths that have been collapsed, so we can just skip the call altogether.
See issue #9350.
2009-09-17 08:42:31 -04:00
Brad King ef8434284f Remove old check for duplicate subdirectories
In cmMakefile::AddSubDirectory we were checking for addition of the same
source directory multiple times.  However, the check code was incorrect
because it compared pointers instetad of pointed-to strings.  Since the
check was written, a better check was added right after it to enforce
unique binary directories (in which case duplicate sources are fine).
This commit simply removes the old-style check code.
2009-09-17 08:25:33 -04:00
KWSys Robot ab64fba44f KWSys Nightly Date Stamp 2009-09-17 00:01:03 -04:00
Bill Hoffman bf9a561cfa Fix typo in name 2009-09-16 21:02:57 -04:00
Alexander Neundorf 298de4374b Major improvement of the generated targets in Eclipse.
Before this change all targets were displayed in the top level directory of
the project. Now the targets are displayed in the correct directory.
The targets "clean" and "all" are now created in every subdirectory.
Also now the targets for just compiling one file, preprocessing one file,
assembling one file are are created for Eclipse.
Additionally all targets get a prefix now in eclipse, so that they are
sorted in a way which makes sense (global targets first, then executable and
libraries, then object files, then preprocessed, then assembly). Also
this prefix gives the user a hint what the target is, i.e. whether it's a
library or an executable or something else.

Alex
2009-09-16 18:01:23 -04:00
Brad King 229b67a249 Create CMake.ConfigureFile test for configure_file
This test checks that configure_file() handles input and output file
arguments as documented.
2009-09-16 15:09:58 -04:00
Brad King 6e8aeba415 Teach configure_file to handle directory names
This commit teaches configure_file how to handle directories for input
and output.  It is an error if the input is a directory.  If the output
is a directory we put the configured copy of the input file in it with
the same name.  See issue #9537.
2009-09-16 15:09:42 -04:00
Brad King 700cdf393a Teach configure_file to handle relative paths
The configure_file() command now converts relative output paths to full
paths using the current binary directory.  Input relative paths were
already converted using the current source directory, but this behavior
was not previously documented.
2009-09-16 15:09:29 -04:00
Brad King dda0da8b9e Fix typo in cmConfigureFileCommand ivar name
Rename 'OuputFile' to 'OutputFile'.
2009-09-16 15:09:19 -04:00
Brad King d23d268e39 Factor out CMake.File test result check for re-use
The CMake.File test runs several scripts through "cmake -P" and checks
the output and result against known good values.  This commit factors
out the checking code into a separate CMakeCheckTest module.  The module
may be used by new tests.
2009-09-16 15:09:10 -04:00
Alexander Neundorf 9d967ed47b Put compiler defined macros into eclipse project files
Now gcc is queried also for the builtin definitions, and they are then added
to the .cproject file. This should make the preprocessor highlighting in
eclipse work better (#9272)
Patch mostly from Miguel.

Alex
2009-09-16 14:37:21 -04:00
Bill Hoffman 72f524efc1 Bug #09476, add more search paths for jni. 2009-09-16 14:20:20 -04:00
Bill Hoffman 0b937cc4ae Fix for bug#9553, print a warning if pkg-config is not found. 2009-09-16 12:40:37 -04:00
Brad King b5e558e291 Fix XL C++ compiler flags on Linux
In Platform/Linux.cmake we add GNU flags as default for the platform
which breaks non-GNU compilers.  Later we should refactor these flag
files to put compiler-specific flags only in files loaded for each
compiler.  Until then this commit fixes the XL C++ compiler flags on
Linux by erasing the GNU flags.  See issue #9469.
2009-09-16 12:33:24 -04:00
Bill Hoffman 932dac93b7 Fix uninitialized errors. 2009-09-16 11:49:09 -04:00
Brad King 2006e4a405 Generate proper Intel Fortran project version
The Intel Visual Fortran compiler plugin for MS Visual Studio may be one
of several versions of the Intel compiler.  This commit teaches CMake to
detect the plugin version and set the version number in .vfproj files.
See issue #9169.
2009-09-16 11:44:50 -04:00
Brad King 09e398fa9f Create VS generator GetRegistryBase method
This method returns the registry key

  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\<version>

A protected GetIDEVersion method retrieves the version-specific part of
the key name.
2009-09-16 11:44:08 -04:00
Brad King 33207a9a87 Test add_subdirectory inside function
This commit teaches the FunctionTest to check variable scope behavior
when a subdirectory is added inside a function call.  Any PARENT_SCOPE
sets in the subdirectory should affect only the function scope which
called add_subdirectory and not its parent scope.
2009-09-16 09:52:04 -04:00
Brad King 24861459b5 Initialize directory scope with closure of parent
The commit "Improve dynamic variable scope implementation" optimized
function scopes using an efficient parent scope pointer.  However, the
parent scope used to initialize a new directory might not exist later
(like add_subdirectory called inside a function of the parent scope).
This caused CMake to crash when following the dangling pointer to the
original parent scope.

We fix the problem in this commit by always computing the closure of the
parent scope at directory initialization time so that no parent scope
pointer is needed.  See issue #9538.
2009-09-16 09:51:47 -04:00
KWSys Robot 2c8e929a70 KWSys Nightly Date Stamp 2009-09-16 00:01:21 -04:00
James Bigler eaaf71d7b3 Initial version of FindCUDA script. Still needs documentation formatting. 2009-09-15 02:38:20 -04:00
KWSys Robot 842098defc KWSys Nightly Date Stamp 2009-09-15 00:01:03 -04:00
Bill Hoffman 77dfbd49b4 Fix for bug #8969, pick a better default version for VS, and make it easier to add new versions of VS to look for. 2009-09-14 22:16:43 -04:00
Bill Hoffman 899f11f919 Fix for bug# 5373, include CMake verison in generated docs. 2009-09-14 20:54:22 -04:00
Alexander Neundorf 72f32c2b98 fix #9152: find ZLIB quietly if PNG is searched QUIETLY
Alex
2009-09-14 15:53:07 -04:00
Bill Hoffman 0a8532c3a0 Bug #8356, add support for image types in Xcode files. 2009-09-14 15:20:15 -04:00
Bill Hoffman 324f51cfc8 Fix for bug #8807, add support for CMAKE_EXE_LINKER_FLAGS_(config) to Xcode generator. 2009-09-14 14:59:28 -04:00
Bill Hoffman c83591e818 Fix for Bug #9190, -U did not work on case insensitive file systems because of call to glob convert to regex that expected to work with files. 2009-09-14 13:45:40 -04:00
Bill Hoffman 14715ce813 Clarify documentation for if. 2009-09-14 13:42:04 -04:00
Zach Mullen 243bbae954 Removed fork-and-continue option from ctest generated batch script entries 2009-09-14 11:23:20 -04:00
Bill Hoffman 6a9a958591 Fix open solaris build issue with concept checking that breaks std vector for a class of itself. Bug #9523. 2009-09-14 10:31:38 -04:00
Bill Hoffman da29eb892b Change FindPythonLibs to use the standard _DIR instead of _PATH but stay backwards compatible 2009-09-14 09:34:57 -04:00
KWSys Robot c32ad6ce32 KWSys Nightly Date Stamp 2009-09-14 00:01:10 -04:00
KWSys Robot ab3d48a008 KWSys Nightly Date Stamp 2009-09-13 00:01:03 -04:00
Brad King bcbb4626a3 Avoid shadowing std::vector member
The cmProcess::Buffer class derives from std::vector.  We were using
local variable 'data' in the GetLine method but this name shadowed a
member of vector with GNU.  This renames it to 'text'.
2009-09-12 10:20:00 -04:00