Commit Graph

22 Commits

Author SHA1 Message Date
Brad King ab65862417 Clang: Add separate "AppleClang" compiler id
Apple distributes their own Clang build with their own version numbers
that differ from upstream Clang.  Use the __apple_build_version__ symbol
to identify the Apple Clang compiler and report the Apple Build Version
as the fourth version component in CMAKE_<LANG>_COMPILER_VERSION.  Add
Compiler/AppleClang-<lang> and Platform/Darwin-AppleClang-<lang> modules
that simply include the upstream equivalents.

Fix comparisons of CMAKE_<LANG>_COMPILER_ID to Clang in CMake's own
source and tests to account for AppleClang.
2013-10-07 20:12:46 -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 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 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
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
Daniel R. Gomez d6865175a7 Tests/Assembler: Assemble and link with same flags (#13314)
The test uses the C compiler as the assembler so use the C flags for ASM
too.  This is important when the flags specify the target ABI.
2012-06-18 16:21:54 -04:00
Brad King b3ce4200dc Do not bother enabling C++ in Assembler test
This test needs only the C compiler and ASM compiler so do not enable
the C++ compiler.
2011-03-04 09:17:30 -05:00
Brad King 80f6a344fc Teach Assembler test to generate main.s at build time
Use a custom command to generate the assembly source file at build time.
Also set CMAKE_VERBOSE_MAKEFILE so the test output contains all the
build rules.  These two changes will show the entire .c -> .s -> .o and
final link commands in the test output.
2011-03-04 09:08:18 -05:00
Brad King 1dafa7498f Fix Assembler test to parse C flags string before using
Commit 1f6c6b1c (use CMAKE_C_FLAGS when generating the assembler file,
2011-03-03) added use of CMAKE_C_FLAGS to the assembler generation step.
However, this variable is meant for direct substitution into a shell
command line so we need to parse it to separate the arguments first.
2011-03-04 08:59:56 -05:00
Alex Neundorf 4139a734fa -only enable the asm test for the Intel compiler if we are under UNIX
...have to find out how to generate assembler with icl.exe

Alex
2011-03-03 23:02:12 +01:00
Alex Neundorf 1f6c6b1cc2 -use CMAKE_C_FLAGS when generating the assembler file
Alex
2011-03-03 22:56:57 +01:00
Alex Neundorf 20fe0beb7e Only try assembler support for Makefile-based generators
Alex
2011-03-01 21:19:39 +01:00
Alex Neundorf 861447097c Use a regexp instead a lot of ORs for checking the compiler ID
Alex
2011-02-24 20:56:53 +01:00
Alex Neundorf cf8809203a The Assembler test now tests ASM for GNU, Intel, HP, XL and SunPro
Alex
2011-02-23 21:30:27 +01:00
Ken Martin ce8810c4e7 ENH: preclean some warnings 2008-03-25 11:27:18 -04:00
Alexander Neundorf 03ea7bf2e1 BUG: fix test
Alex
2007-07-06 14:02:42 -04:00
Alexander Neundorf ef7b647b3b COMP: OPTIONAL was missing in ENABLE_LANGUAGE()
-the assembler file seems to work for Linux and FreeBSD
-try to fix main() for HP-UX compiler

Alex
2007-07-06 08:53:16 -04:00
Alexander Neundorf 7627b96dd1 STYLE: some more output
Alex
2007-07-05 16:38:16 -04:00
Alexander Neundorf 0589ff74ae COMP: skip APPLE, since there with universal binaries the assembler file would be built for both architectures
Alex
2007-07-05 16:32:40 -04:00
Alexander Neundorf f9fb18f875 COMP: let's see if this assembler file works also on other platforms than linux...
Alex
2007-07-05 16:11:20 -04:00
Alexander Neundorf 5021eb90b9 ENH: add a simple assembler test
Alex
2007-07-05 09:05:40 -04:00