Commit Graph

10142 Commits

Author SHA1 Message Date
Bill Hoffman 4fd75f959a add better error checking and support for symlinks to cpack's use of libarchive 2009-11-08 20:54:13 -05:00
Bill Hoffman 79b8d61ae9 Fix for working with symlinks in tar files 2009-11-08 19:59:01 -05:00
Bill Hoffman f5fe20dc12 Fix some warnings 2009-11-08 10:34:12 -05:00
Bill Hoffman aae8dca797 fix line length error 2009-11-08 10:25:42 -05:00
Bill Hoffman 7961c8685b go back to running stat and put size check in 2009-11-08 10:19:36 -05:00
KWSys Robot 3c17c4117f KWSys Nightly Date Stamp 2009-11-07 23:58:00 -05:00
Bill Hoffman 34ce92f151 Remove check for now so test passes on linux 2009-11-07 21:08:38 -05:00
Bill Hoffman 03cebb9a7f create a better error message 2009-11-07 20:45:34 -05:00
Bill Hoffman 3d1afdee4a add much better error checking on libarchive calls. 2009-11-07 19:35:35 -05:00
KWSys Robot a7ba04a8cc KWSys Nightly Date Stamp 2009-11-06 23:58:04 -05:00
David Cole d6fe0438c1 Fix issue #9851 - only seed the random number generator on the first call to STRING(RANDOM or if given the new RANDOM_SEED argument. Add test and documentation of new argument. 2009-11-06 10:07:10 -05:00
Brad King 10762565e9 Implement LINK_FLAGS_<CONFIG> property on Xcode
See issue #9841.
2009-11-06 08:04:19 -05:00
KWSys Robot 723453d4aa KWSys Nightly Date Stamp 2009-11-05 23:58:10 -05:00
Zach Mullen a9a4814971 Fix compiler error in cmSystemTools.cxx 2009-11-05 16:14:46 -05:00
Zach Mullen 4b795e7bca Doc --help-command, --help-command-list, --help-commands for ctest. (bug 9833) 2009-11-05 15:25:24 -05:00
Bill Hoffman dd09d88065 Add JOM support and clean up some of the tar -E stuff 2009-11-05 15:00:15 -05:00
Zach Mullen 9f105a3f6d Fix style warning in cmsystemtools, cosmetic change to ctest code 2009-11-05 11:37:47 -05:00
Zach Mullen 9aa4e134b5 Fixed infinite loop condition when a test's dependent test executable could not be found. 2009-11-05 11:03:07 -05:00
KWSys Robot 0cdc1e979e KWSys Nightly Date Stamp 2009-11-04 23:58:17 -05:00
Brad King 3a790251f4 Document and test find_package <pkg>_DIR env var
The find_package(<pkg>) command checks the <pkg>_DIR environment
variable.  This commit documents and tests the feature.
2009-11-04 13:14:57 -05:00
Zach Mullen cdbbe00a8b Fix unused param warning resulting from libarchive API change. 2009-11-04 11:36:23 -05:00
Zach Mullen d6630330d6 Fixed ctest doc typos. (bug 9836) 2009-11-04 10:24:30 -05:00
KWSys Robot f87bdbf328 KWSys Nightly Date Stamp 2009-11-03 23:58:33 -05:00
Bill Hoffman b0d43475c6 Fix warning 2009-11-03 17:21:25 -05:00
Bill Hoffman 5f41fe03ca Fix warnings for unused variables 2009-11-03 16:50:49 -05:00
Zach Mullen 85912a3777 Added TARGET, CONFIGURATION, PROJECT_NAME, and FLAGS arguments to ctest_build command 2009-11-03 16:46:30 -05:00
Bill Hoffman 78b2d5097c Fix cygwin package stuff to work with libarchive 2009-11-03 09:40:57 -05:00
KWSys Robot 1b1d954f7e KWSys Nightly Date Stamp 2009-11-02 23:58:29 -05:00
Zach Mullen d47ada823a Added logic to check for cycles in the test dependency graph before any tests are run. Previously a cycle resulted in a segfault from stack overflow. 2009-11-02 12:52:50 -05:00
Brad King 59f6f383e9 Warn on set(PARENT_SCOPE) at top scope
Previously we silently ignored such calls and set nothing.  The commit
"Initialize directory scope with closure of parent" inroduced a bad test
for the top scope.  This commit fixes the test to avoid dereferencing a
null pointer, and adds a warning when the case is encountered.
2009-11-02 11:56:17 -05:00
Bill Hoffman d4b8945301 Fix for hpux... 2009-11-02 09:20:53 -05:00
KWSys Robot 66fdf2038c KWSys Nightly Date Stamp 2009-11-01 23:58:34 -05:00
KWSys Robot e2d9595ae9 KWSys Nightly Date Stamp 2009-10-31 23:58:41 -04:00
KWSys Robot b7e25ab3e0 KWSys Nightly Date Stamp 2009-10-30 23:58:46 -04:00
Clinton Stimpson 3dab0e477f Fix bug #9722. Report error when not able to create build directory. 2009-10-30 15:02:25 -04:00
Bill Hoffman fb51d98562 Switch to using libarchive from libtar for cpack and cmake -E tar
This allows for a built in bzip and zip capability, so external tools
will not be needed for these packagers.  The cmake -E tar xf should be
able to handle all compression types now as well.
2009-10-30 13:10:56 -04:00
David Cole 43d07f6620 Fix more mismatched new[] / delete[] (eliminate invalid auto_ptr use) to correct valgrind reported memory issues. 2009-10-30 10:31:54 -04:00
KWSys Robot 4e26159ec2 KWSys Nightly Date Stamp 2009-10-29 23:58:53 -04:00
Zach Mullen 8612aa10b6 Hook for scheduling tests in a random order
This may help statistically detect implicit dependencies among unit
tests while running in parallel.
2009-10-29 15:30:12 -04:00
Bill Hoffman d7a3277fb3 Fix bug#9767 catch missing leak. 2009-10-29 08:38:04 -04:00
KWSys Robot 45d0e96694 KWSys Nightly Date Stamp 2009-10-28 23:59:01 -04:00
Brad King 74c59a748d Introduce per-config OUTPUT_DIRECTORY properties
We create per-configuration target properties to specify ARCHIVE,
LIBRARY, and RUNTIME output directories.  The properties override the
generic properties for the <CONFIG> configuration:

  ARCHIVE_OUTPUT_DIRECTORY -> ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>
  LIBRARY_OUTPUT_DIRECTORY -> LIBRARY_OUTPUT_DIRECTORY_<CONFIG>
  RUNTIME_OUTPUT_DIRECTORY -> RUNTIME_OUTPUT_DIRECTORY_<CONFIG>

For multi-configuration generators, the per-configuration subdirectory
normally appended to the generic output directory is not added to the
configuration-specific property values.  This allows projects to set the
exact location at which binaries will be placed for each configuration.

See issue #9163.
2009-10-28 13:35:25 -04:00
Brad King ba728f911a Consolidate duplicate documentation in cmTarget
The documentation of (ARCHIVE|LIBRARY|RUNTIME)_OUTPUT_DIRECTORY was
duplicated.  We consolidate it using a macro.
2009-10-28 13:34:59 -04:00
Brad King b38c2929b0 Create a static library's output dir for VS 6
VS 6 forgets to create the output directory for a static library if it
differs from the intermediate files directory.  We work around this VS
bug by creating a pre-link event on the library target to make the
directory.
2009-10-28 12:19:15 -04:00
Brad King 90b8164e44 Use per-config output dir in VS 6 templates
This commit removes use of configuration-less cmTarget::GetDirectory()
by the VS 6 generator (except for compatibility with user templates).
We replace OUTPUT_DIRECTORY_<CONFIG> tokens in the templates using the
per-configuration result of cmTarget::GetDirectory(config).
2009-10-28 12:18:55 -04:00
Brad King 1024ffad82 Fix Xcode <= 2.0 projects with CMAKE_BUILD_TYPE
The dependency-helper makefiles should not have per-configuration names
for Xcode <= 2.0.  Older Xcodes do not support multiple configurations.
2009-10-28 12:18:24 -04:00
Brad King 172d503c61 Fix try_compile when file cannot be found
The try_compile() command's COPY_FILE option should not try to actually
copy the file if it cannot be found.  Some C runtime library's fopen
cannot handle an empty file name.
2009-10-28 11:24:08 -04:00
Brad King 95038439ea Keep Xcode intermediate files away from output dir
Previously the Xcode generator set SYMROOT to be the target output
directory.  This told Xcode to put the "<proj>.build" directory in the
output path too.

This commit sets SYMROOT, CONFIGURATION_BUILD_DIR, and OBJROOT to put
intermediate files in the build directory corresponding to the source
directory that created each target.  This is more consistent with the VS
IDE generators.  Now only the build output files (actual targets) go to
the target output directory.
2009-10-28 09:12:38 -04:00
Brad King e0d0d5db0f Remove unreachable code in cmIfCommand
The commit "Fix if() command and CMP0012 OLD/NEW behavior" introduced an
unreachable 'break' after 'return' in a switch statement.  We remove it.
2009-10-28 08:45:46 -04:00
KWSys Robot e97fc32a63 KWSys Nightly Date Stamp 2009-10-27 23:59:07 -04:00
Zack Galbreath 134d8dee1e BUG: hardcore some values so output matches cmVS10CLFlagTable.h (addresses bug #9753) 2009-10-27 11:35:37 -04:00
Zach Mullen e2b63e473d Fix working dir issue for ctest show only mode (-N) 2009-10-27 10:16:01 -04:00
Brad King cb185d93d2 Fix if() command and CMP0012 OLD/NEW behavior
The commit "modified the if command to address bug 9123 some" changed
the if() command behavior with respect to named boolean constants.  It
introduced policy CMP0012 to provide compatibility.  However, it also
changed behavior with respect to numbers (like '2') but did not cover
the change with the policy.  Also, the behavior it created for numbers
is confusing ('2' is false).

This commit teaches if() to recognize numbers again, and treats them
like the C language does in terms of boolean conversion.  We also fix
the CMP0012 check to trigger in all cases where the result of boolean
coersion differs from that produced by CMake 2.6.4.
2009-10-27 09:07:39 -04:00
Brad King 9f43fa602d Report expanded arguments in if() command errors
The if() command reports its arguments at the beginning of some error
messages.  Originally it reported the un-expanded form of the arguments
because in ancient CMake versions no context information was available.
Now it is more useful to see the real arguments, which may be mentioned
in the main error message.  Since full context information is now
available, users can refer back to the source if they need to see the
unexpanded form of the arguments.

For example, the code

  set(regex "++")
  if("x" MATCHES "${regex}")
  endif()

now produces the message

  if given arguments:

    "x" "MATCHES" "++"

  Regular expression "++" cannot compile

instead of

  if given arguments

    "x" MATCHES "${regex}"

  Regular expression "++" cannot compile
2009-10-27 09:01:33 -04:00
KWSys Robot 92caf34733 KWSys Nightly Date Stamp 2009-10-26 23:59:12 -04:00
David Cole e0bbaa889a Correct one of the valgrind errors from the CPackTestAllGenerators test. Do not use auto_ptr on a new [] allocation because auto_ptr does not use delete []. 2009-10-26 13:49:20 -04:00
Clinton Stimpson 0b8837814a ENH: Move SetErrorMode around calls to generate and configure instead of setting it for the whole application. 2009-10-26 13:18:15 -04:00
Brad King 7b28fbd656 Fix Xcode dylib version default
The commit "Set version info for shared libs on OSX" taught the Xcode
generator to honor VERSION and SOVERSION properties.  However, it also
set version '1.0.0' as the default when no version property is set,
which is inconsistent with the Makefiles generator.  This commit fixes
the default to '0.0.0' for consistency.

See issue #9773.
2009-10-26 10:05:46 -04:00
Zach Mullen 99697308f3 Add a ctest test to cover cmCTestBatchTestHandler. Since its behavior isn't fully defined yet, we just run it as is and don't care much about the result. 2009-10-26 09:44:08 -04:00
Brad King 5ff4e04180 Revert "Always set OutputPath in VS 10 projects"
The reverted commit attempted to preserve the "../" PREFIX work-around
for avoiding per-config build directories in the VS IDE generators.
However, the original reporter has concluded that a "../" PREFIX no
longer works everywhere in VS 10 project files anyway.  Rather than set
OutputPath, this commit restores the $(OutDir)$(TargetName)$(TargetExt)
default.

See issue #9768.
2009-10-26 08:57:01 -04:00
KWSys Robot 3d8784cd52 KWSys Nightly Date Stamp 2009-10-25 23:59:16 -04:00
KWSys Robot 609d27e4fa KWSys Nightly Date Stamp 2009-10-24 23:59:27 -04:00
KWSys Robot f5545899ae KWSys Nightly Date Stamp 2009-10-23 23:59:33 -04:00
Bill Hoffman 7963046350 Fix the showing of non-cpp files in the IDE 2009-10-23 17:02:27 -04:00
Brad King 8ae66bf456 Fix optionally-valued booleans in VS 10 flag table
This commit fixes the cmparseMSBuildXML.py script to generate correct
flag table entries for booleans with optional value.  These flags use
two entries: the first should ignore the value and enable the option,
and the second should use the value if given.  Previously the first
entry did not recognize flags with values.

In particular this fixes flags like /MP4, but the change corrects
matching of some other flags too.  See issue #9771.
2009-10-23 14:59:26 -04:00
Brad King 5484550af6 Detect and set Unicode character set in VS 10
This commit teaches the VS 10 generator to detect the -D_UNICODE option
in preprocessor definitions and set the CharacterSet attribute to the
value 'Unicode'.  This was already done for other VS IDE versions.

See issue #9769
2009-10-23 11:34:37 -04:00
Brad King d4377c3377 Always set OutputPath in VS 10 projects
The default $(OutDir)$(TargetName)$(TargetExt) for this value works in
most cases because we set the three properties.  However, if the target
property PREFIX contains a path component (not documented but happens to
work in other VS generators) we drop it from TargetName and do not put
it in OutDir either.  This commit corrects the resulting path by setting
the OutputPath property explicitly with the full path.

See issue #9768.
2009-10-23 11:33:27 -04:00
Brad King 867a1cc12c Fix line-too-long style violations
The commit "Define per-target OSX_ARCHITECTURES property" introduced
some long lines.  This wraps them into multiple shorter lines.
2009-10-23 08:02:24 -04:00
KWSys Robot 11d85a5748 KWSys Nightly Date Stamp 2009-10-22 23:59:35 -04:00
Brad King 70e98c73e9 Add Xcode file association for Fortran
Intel Fortran on Mac OS X enables Fortran support in Xcode.  This commit
teaches CMake to associate Fortran sources properly in Xcode projects.

See issue #9739.
2009-10-22 10:57:44 -04:00
Brad King 457b95322d Fix VS 10 flag table for precompiled headers
The VS 10 flag table generation script did not produce correct entries
for precompiled header flags.  Since precompiled header flag translation
requires multiple entries cooperating in a certain order, it is not
worth the time to make the generation script work automatically.  This
commit manually adds the proper entries.

See issue #9753.
2009-10-22 10:47:59 -04:00
Brad King 4f96af44f6 Fix VS 10 .sln files for Windows Explorer
This commit fixes generated .sln files so they open VS 2010 correctly
when double-clicked in Windows Explorer.

See issue #9758.
2009-10-22 10:22:16 -04:00
Brad King 0f0b726f50 Fix Microsoft.Cpp.$(Platform).user.props in VS10b2
MS changed the location of the Microsoft.Cpp.$(Platform).user.props
file.  This commit teaches the VS 10 generator about the new location.

See issue #9759.
2009-10-22 10:21:35 -04:00
Bill Hoffman 44c4600ae5 Fix up download a bit, better error checking and uses of long not double for timeout as curl needs, bug# 9748 2009-10-22 09:44:58 -04:00
Brad King 50759a9ed3 WIP: VS 10 Win64 generator
See issue #9754.
2009-10-22 08:24:11 -04:00
KWSys Robot 7b5ae0d282 KWSys Nightly Date Stamp 2009-10-21 23:59:41 -04:00
Bill Hoffman 7c06e91c9c Fix for bugs #9756, #9690 and #9755, header files were not included, and link_directories we incorrect 2009-10-21 21:30:41 -04:00
Brad King 9a88bc8c4b Use copies for versioned names on Windows
Versioned UNIX libraries and executables produce multiple names for a
single target using one of

  cmake -E cmake_symlink_library
  cmake -E cmake_symlink_executable

to create symlinks to the real file for the extra names.  However, when
cross-compiling from Windows to Linux we cannot create symlinks.  This
commit teaches CMake to make copies instead of symbolic links when
running on windows.  While this approach does not produce exactly what
Linux wants to see, at least the build will complete and the binary will
run on the target system.  See issue #9171.
2009-10-21 13:12:21 -04:00
Brad King 7a6db286c8 Tweak all files during target installation
During installation of a target we generate "tweak" rules to update the
installed file (RPATH, strip, ranlib, etc.).  However, some targets
install multiple files, such as the versioned names of a shared library.

Previously the extra files for a target have always been symbolic links,
but for cross-compiling from Windows to UNIX they may need to be copies.
This commit teaches the generated install scripts to loop over all files
installed for the target to apply tweaks to those that are not symlinks.

See issue #9171.
2009-10-21 13:11:42 -04:00
Brad King 7a9f75c1a8 Add IS_SYMLINK test to if command 2009-10-21 13:11:16 -04:00
Brad King a52fd03a2a Compute install destination for all target files
In cmInstallTargetGenerator::GenerateScriptForConfig we were computing
the full 'from' paths for all target files to be installed, but only
computing a 'to' path for the "main" target file.  This commit teaches
the method to compute both 'from' and 'to' paths for every target file
to be installed.  The result is cleaner, easier to follow, and will
allow installation tweaks to be added later on all target files.
2009-10-21 13:10:51 -04:00
Brad King 22cbfefb76 Factor out "cmake -E cmake_symlink_*" code
We factor the implementation of

   cmake -E cmake_symlink_library
   cmake -E cmake_symlink_executable

out of cmake::ExecuteCMakeCommand into methods

   cmake::SymlinkLibrary
   cmake::SymlinkExecutable

plus a helper method cmake::SymlinkInternal.
2009-10-21 13:10:24 -04:00
Brad King 3c326476ee Simplify 'strip' and 'ranlib' install tweak code
The cmInstallTargetGenerator methods AddStripRule and AddRanlibRule do
not need the target type argument.  They can simply use the type of the
target for which the generator instance was created.
2009-10-21 13:09:55 -04:00
Brad King 2dc39b8c32 Define per-target OSX_ARCHITECTURES property
The CMAKE_OSX_ARCHITECTURES variable works only as a global setting.
This commit defines target properties

  OSX_ARCHITECTURES
  OSX_ARCHITECTURES_<CONFIG>

to specify OS X architectures on a per-target and per-configuration
basis.  See issue #8725.
2009-10-21 13:00:49 -04:00
Bill Hoffman 2f94a2c919 Fix seg fault for empty ENV{} call bug #9747 2009-10-21 09:04:50 -04:00
KWSys Robot 7130628312 KWSys Nightly Date Stamp 2009-10-20 23:59:52 -04:00
Alexander Neundorf 9ab9bb0ece make testing the CodeBlocks and Eclipse generators easier by not requiring the CMAKE_EDIT_COMMAND variable
Both generators use the CMAKE_EDIT_COMMAND variable to determine whether
they should add the edit_cache target, i.e. they don't add it if it's
ccmake, since this does not work inside the output log view of
Eclipse/Codeblocks. But instead of requiring the variable to be set they now
check it for 0 and handle this appropriately. This should help Dave getting
some testing for them :-)

Alex
2009-10-20 17:14:12 -04:00
Brad King bc43b0f2a4 Do not link library dependencies in VS solutions
In VS 8 and greater this commit implements

  add_dependencies(myexe mylib) # depend without linking

by adding the

  LinkLibraryDependencies="false"

option to project files.  Previously the above code would cause myexe to
link to mylib in VS 8 and greater.  This option prevents dependencies
specified only in the solution from being linked.  We already specify
the real link library dependencies in the project files, and any project
depending on this to link would not have worked in Makefile generators.

We were already avoiding this problem in VS 7.1 and below by inserting
intermediate mylib_UTILITY targets.  It was more important for those
versions because if a static library depended on another library the
librarian would copy the dependees into the depender!  This is no longer
the case with VS 8 and above so we do not need that workaround.

See issue #9732.
2009-10-20 16:38:37 -04:00
Zach Mullen f2010871ba Ctest was broken for subdirs. Restored working directory state for tests so that their executables could be found. 2009-10-20 10:54:02 -04:00
KWSys Robot c6a4dce3f4 KWSys Nightly Date Stamp 2009-10-19 23:59:53 -04:00
Brad King 0140d293de Avoid C++ linker language in VS Fortran project
In Visual Studio project files we pass compiler flags to the whole
target based on the linker language, which works for MS tools and
combinations of C and C++.  For the Intel Fortran plugin though the
generated .vfproj files should never contain C or C++ options.

We generate .vfproj files only for targets consisting only of Fortran
code.  Now that the linker language is computed transitively through
linking it is possible that the linker language is C++ for an otherwise
Fortran-only project.  This commit forces Fortran as the linker language
for the purpose of specifying target-wide flags in .vfproj files.

See issue #9719.
2009-10-19 15:21:01 -04:00
Alexander Neundorf 5e2851f855 fix two more icpc warnings, ok by Brad (float compared for equality, unused variable)
Alex
2009-10-19 12:57:36 -04:00
Brad King 7766473d3e Avoid duplicate ZERO_CHECK in VS solutions
The commit "Avoid non-root copies of root-only targets" moved the check
for root-only targets into cmGlobalGenerator::GetTargetSets to avoid
adding multiple ALL_BUILD targets to the "original" target set.  This
approach did not work for ZERO_CHECK targets though because those are
pulled in by dependency analysis.

Instead we eliminate duplicate ZERO_CHECK targets altogether and refer
to a single one from all solution files.  This cleans up VS 10 project
file references to ZERO_CHECK targets anyway.
2009-10-19 10:47:34 -04:00
KWSys Robot b3b2943662 KWSys Nightly Date Stamp 2009-10-18 23:59:58 -04:00
KWSys Robot 95a25ad8c4 KWSys Nightly Date Stamp 2009-10-18 00:00:07 -04:00
David Cole 16d995d728 Fixed issues with message text in FILE command error situations. Added many new test cases to increase the coverage of the FILE command even further. 2009-10-17 11:43:15 -04:00
KWSys Robot 772253ecc6 KWSys Nightly Date Stamp 2009-10-17 00:00:11 -04:00
David Cole 847918b38f Better fix for crash on Windows. This time it will even work on Linux, too. That GetLineFromStream method while loop sure is fussy. 2009-10-16 13:23:52 -04:00
David Cole 9578bfc0ef Fix crash on Windows. If input stream is no good, do not try to read a line from it. Return false and an empty line instead... 2009-10-16 11:43:05 -04:00
KWSys Robot 023889cb2c KWSys Nightly Date Stamp 2009-10-16 00:01:00 -04:00