Commit Graph

19233 Commits

Author SHA1 Message Date
Brad King 952651c642 Detect TI compiler version with its id
Decode decimal digits from __TI_COMPILER_VERSION__ to compute version
number components.  See documentation at:

  http://processors.wiki.ti.com/index.php/Refer_to_Compiler_Version_in_Your_Source
  http://www.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=spru187o
  http://sourceforge.net/p/predef/wiki/Compilers/#texas-instruments-cc-compiler
2012-08-22 10:17:01 -04:00
Brad King 74c57d99b4 Detect PathScale compiler version with its id
Decode decimal digits from

  __PATHCC__
  __PATHCC_MINOR__
  __PATHCC_PATCHLEVEL__

to compute version number components.  See documentation at:

  http://www.pathscale.com/docs/UserGuide.pdf
  http://sourceforge.net/p/predef/wiki/Compilers/#ekopathhttpenwikipediaorgwikipathscale
2012-08-22 10:17:01 -04:00
Brad King 707aefd853 Detect Compaq compiler version with its id
Decode decimal digits from __DECC_VER and __DECCXX_VER to compute
version number components.  See documentation at:

  http://www.openvms.compaq.com/commercial/c/docs/5492p024.html#decc_ver_sec
  http://www.tru64unix.compaq.com/cplus/ugu_impl.html#predef_vernum
  http://sourceforge.net/p/predef/wiki/Compilers/#compaq-cchttpwwwopenvmscompaqcomopenvmsbrochuresdeccplus
2012-08-22 10:17:01 -04:00
Kitware Robot addefc2ae3 CMake Nightly Date Stamp 2012-08-15 00:01:03 -04:00
Brad King cd3bd23266 Merge topic 'cleanup-style'
68bc863 Merge branch 'master' into cleanup-style
a05eba5 CMakeVersion.bash: Update sed expression for lower-case 'set'
3c0488d Fix WarnUnusedUnusedViaUnset test pass/fail regex
6c2c483 Remove trailing TAB from NSIS.template.in
9db3116 Remove CMake-language block-end command arguments
77543bd Convert CMake-language commands to lower case
7bbaa42 Remove trailing whitespace from most CMake and C/C++ code
be9db98 Merge topic 'watcom-compiler-version'
af42ae4 Watcom: Simplify compiler version detection (#11866)
2012-08-14 08:31:45 -04:00
Brad King 68bc863d5b Merge branch 'master' into cleanup-style
Conflicts:
	Source/CMakeVersion.cmake
2012-08-14 08:27:23 -04:00
Brad King a05eba57b5 CMakeVersion.bash: Update sed expression for lower-case 'set'
Since commit 77543bde (Convert CMake-language commands to lower case,
2012-08-13) the CMakeVersion.cmake file contains lower-case 'set'
commands.  Teach CMakeVersion.bash to replace the lower-case name
instead of the old upper-case 'SET'.
2012-08-14 08:25:51 -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
Brad King 6c2c483ef9 Remove trailing TAB from NSIS.template.in
This was missed by commit 7bbaa428 (Remove trailing whitespace from most
CMake and C/C++ code, 2012-08-13) which only removed trailing spaces,
not TABs.
2012-08-14 08:05:41 -04:00
Kitware Robot 9acb4f118c CMake Nightly Date Stamp 2012-08-14 00:01:08 -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
Brad King be9db98946 Merge topic 'watcom-compiler-version'
af42ae4 Watcom: Simplify compiler version detection (#11866)
2012-08-13 14:18:28 -04:00
David Cole f0295575d7 Merge topic 'xcode-select'
e88bae7 Xcode: Run xcode-select to find Xcode version file (#13463)
2012-08-13 13:28:49 -04:00
David Cole e0f7d7fe5a Merge topic 'CPackRPM-fixRelocatablePrefix'
822c1ea Do not include directories which are part of the package install prefix.
2012-08-13 13:28:36 -04:00
David Cole 1f793ab6ba Merge topic 'fix-typo-13456'
67f11cf FindSelfPackers: fix typo (#13456)
2012-08-13 13:28:25 -04:00
David Cole 396bc28477 Merge topic 'doc_fixes'
76d6c59 Clean up documentation formatting so that it is rendered properly in HTML.
2012-08-13 13:28:16 -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 0d28661999 Merge topic 'select-compiler'
7e58e5b Prefer generic system compilers by default for C, C++, and Fortran
796e337 Factor common code out of CMakeDetermine(ASM|C|CXX|Fortran)Compiler
b708f1a CMakeDetermine(C|CXX)Compiler: Consider Clang compilers
2012-08-13 13:27:57 -04:00
David Cole 4bdbdfbfef Merge topic 'directory-typo'
6c8722f Fix typo direcotry -> directory (and similar) [#13444]
2012-08-13 13:27:48 -04:00
David Cole 92b11383d9 Merge topic 'SelectLibraryConfiguration-multi-lib-per-var2'
5797512 SelectLibraryConfiguration: generate correct output when input vars are lists
2012-08-13 13:27:39 -04:00
David Cole 11a9ea35de Merge topic 'FindOpenSSL-improve'
3cfb68d FindOpenSSL: remove leftover comment
fc798ed FindOpenSSL: cleanup path hints
c78a7d1 FindOpenSSL: let CMake handle environment variable HINTS
7464519 FindOpenSSL: use SelectLibraryConfigurations
4b793ad FindOpenSSL: find cross-compiled OpenSSL from MinGW (#13431)
2012-08-13 13:27:31 -04:00
David Cole 20f56a7eed Merge topic 'EclipseFixBadLinkedResources'
4ea5dc5 Eclipse: fix #13358: don't create bad linked resources
2012-08-13 13:27:17 -04:00
David Cole 1b9684562b Merge topic 'EclipseAddSupportForJuno'
53cc102 Eclipse: improve (fix ?) version detection on OSX
bcccddc Eclipse: add support for the 4.2 Juno release (#13367)
2012-08-13 13:27: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
David Cole e93d9c5c2b Merge topic 'use_normal_ouput_with_chdir'
4ddd3b9 Use OUTPUT_NORMAL instead of OUTPUT_MERGE for cmake -E chdir.
2012-08-13 13:26:48 -04:00
David Cole e856509093 Merge topic 'release-script-fixes'
214589b Add ability to run as a ctest -S script also
2012-08-13 13:26:39 -04:00
David Cole bed44c2cc1 Merge topic 'exclude-ExternalProject-test-for-cygwin-release-script'
3a17311 Release: Temporarily exclude ExternalProject test on cygwin
2012-08-13 13:26:30 -04:00
Brad King af42ae4f81 Watcom: Simplify compiler version detection (#11866)
Since commit c198730b (Detect Watcom compiler version with its id,
2011-12-07) the CMAKE_(C|CXX)_COMPILER_VERSION variables are set for the
Watcom compiler.  Use these in Windows-wcl386.cmake to set the old
WATCOM1* version variables.  This avoids using the old EXECUTE_PROCESS
command which failed due to extra quotes anyway.
2012-08-13 08:19:23 -04:00
Kitware Robot 408c04e734 CMake Nightly Date Stamp 2012-08-13 00:01:02 -04:00
Kitware Robot ee1ee20905 CMake Nightly Date Stamp 2012-08-12 00:01:02 -04:00
Kitware Robot 95e8636711 CMake Nightly Date Stamp 2012-08-11 00:01:02 -04:00
Brad King e88bae77c3 Xcode: Run xcode-select to find Xcode version file (#13463)
Multiple versions of Xcode may be installed in different locations.
Run "xcode-select --print-path" to detect the active Xcode location
and parse its Contents/version.plist file.  Note that the Xcode.app
directory name may vary in developer versions.
2012-08-10 12:58:22 -04:00
Kitware Robot 539cc289ba CMake Nightly Date Stamp 2012-08-10 00:01:04 -04:00
David Cole b3b43a420d Begin post-2.8.9 development 2012-08-09 16:28:18 -04:00
David Cole c462aafcfa CMake 2.8.9 2012-08-09 13:57:02 -04:00
David Cole 22d7094966 Merge branch 'release' 2012-08-09 13:54:45 -04:00
Kitware Robot 2c061d5cc9 CMake Nightly Date Stamp 2012-08-09 00:01:03 -04:00
Kitware Robot 121cc34d71 CMake Nightly Date Stamp 2012-08-08 00:01:05 -04:00
Andy Piper 822c1eaf9e Do not include directories which are part of the package install prefix.
This fix bug #0013451. The bug prevents theorerically relocatable RPM package
to be installed properly.
Signed-off-by: Eric NOULARD <eric.noulard@gmail.com>
2012-08-07 19:15:19 +02:00
Kitware Robot 3bfabfa04a CMake Nightly Date Stamp 2012-08-07 00:01:04 -04:00
Kitware Robot e2a57173df CMake Nightly Date Stamp 2012-08-06 00:01:02 -04:00
Kitware Robot dc5b0b232b CMake Nightly Date Stamp 2012-08-05 00:01:07 -04:00
Rolf Eike Beer 67f11cf1e9 FindSelfPackers: fix typo (#13456)
Correction by Modestas Vainius.
2012-08-04 14:44:38 +02:00
Kitware Robot 92bf48dd9e CMake Nightly Date Stamp 2012-08-04 00:01:10 -04:00
Zack Galbreath 76d6c59358 Clean up documentation formatting so that it is rendered properly in HTML. 2012-08-03 14:52:32 -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
Kitware Robot 896524e13f CMake Nightly Date Stamp 2012-08-03 00:01:05 -04:00
Brad King 7e58e5bb68 Prefer generic system compilers by default for C, C++, and Fortran
Teach CMake to prefer the system default compiler automatically when no
compiler is specified.  By default use "cc" for C, "CC" for C++, and
"f95" for Fortran.  Load a new Platform/<os>-<lang>.cmake module to
allow each platform to specify for each language its system compiler
name(s) and/or exclude certain names.

Create Platform/(CYGWIN|Darwin|Linux|Windows)-CXX.cmake modules to
specify "c++" as the system C++ compiler name for these platforms.  On
systems that use case-insensitive filesystems exclude C++ compiler names
that are distinguished from C compiler names only by case.

This will change the default compiler selection for existing build
scripts that do not specify a compiler when run on machines with
separate system and GNU compilers both installed in the PATH.  We do not
make this change in default behavior lightly.  However:

(1) If a given build really needs specific compilers one should specify
    them explicitly e.g. by setting CC, CXX, and FC in the environment.

(2) The motivating case is to prefer the system Clang on newer OS X
    systems over the older GNU compilers typically also installed.  On
    such systems the names "cc" and "c++" link to Clang.  This is the
    first platform known to CMake on which "c++" is not a GNU compiler.
    The old behavior selected "gcc" for C and "c++" C++ and therefore
    chooses GNU for C and Clang for C++ by default.  The new behavior
    selects GNU or Clang consistently for both languages on older or
    newer OS X systems, respectively.

(3) Other than the motivating OS X case the conditions under which the
    behavior changes do not tend to exist in default OS installations.
    They typically occur only on non-GNU systems with manually-installed
    GNU compilers.

(4) The consequences of the new behavior are not dire.  At worst the
    project fails to compile with the system compiler when it previously
    worked with the non-system GNU compiler.  Such failure is easy to
    work around (see #1).

In short this change creates a more sensible default behavior everywhere
and fixes poor default behavior on a widely-used platform at the cost of
a modest change in behavior in less-common conditions.
2012-08-02 13:26:01 -04:00