summaryrefslogtreecommitdiffstats
path: root/Tests/Assembler/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-07-06 12:53:16 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-07-06 12:53:16 (GMT)
commitef7b647b3b11d6526439d3ececed254c237b3eac (patch)
tree88c584aad3e959b8e49a7109630e79da7548afc4 /Tests/Assembler/CMakeLists.txt
parent7627b96dd1c983cdf210ba65a49accdc0b743fc1 (diff)
downloadCMake-ef7b647b3b11d6526439d3ececed254c237b3eac.zip
CMake-ef7b647b3b11d6526439d3ececed254c237b3eac.tar.gz
CMake-ef7b647b3b11d6526439d3ececed254c237b3eac.tar.bz2
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
Diffstat (limited to 'Tests/Assembler/CMakeLists.txt')
-rw-r--r--Tests/Assembler/CMakeLists.txt25
1 files changed, 12 insertions, 13 deletions
diff --git a/Tests/Assembler/CMakeLists.txt b/Tests/Assembler/CMakeLists.txt
index 54e538b..d51c254 100644
--- a/Tests/Assembler/CMakeLists.txt
+++ b/Tests/Assembler/CMakeLists.txt
@@ -2,20 +2,19 @@ project(Assembler)
set(SRCS)
-message(STATUS "Testing assembler support, system: ${CMAKE_SYSTEM_NAME} processor: ${CMAKE_SYSTEM_PROCESSOR}")
-
# if no file has been set as source and we are on linux with an x86 processor try to use the gas/as assembler
-if(NOT SRCS AND NOT APPLE AND CMAKE_SYSTEM_PROCESSOR MATCHES "[ix].?86$")
-# if(NOT SRCS AND CMAKE_SYSTEM_NAME MATCHES Linux AND CMAKE_SYSTEM_PROCESSOR MATCHES "[ix].?86$")
- message(STATUS "Trying to enable ASM-ATT for Linux/x86")
- enable_language(ASM-ATT)
- if(CMAKE_ASM-ATT_COMPILER_WORKS)
- message(STATUS "Trying to enable ASM-ATT for Linux/x86 - succeeded")
- # this assembler file was created using gcc -S main.c
- set(SRCS main-linux-x86-gas.s)
- endif(CMAKE_ASM-ATT_COMPILER_WORKS)
-endif(NOT SRCS AND NOT APPLE AND CMAKE_SYSTEM_PROCESSOR MATCHES "[ix].?86$")
-# endif(NOT SRCS AND CMAKE_SYSTEM_NAME MATCHES Linux AND CMAKE_SYSTEM_PROCESSOR MATCHES "[ix].?86$")
+# main-linux-x86-gas.s seems to work for Linux and FreeBSD
+if(NOT SRCS AND CMAKE_SYSTEM_PROCESSOR MATCHES "[ix].?86$")
+ if(CMAKE_SYSTEM MATCHES Linux or CMAKE_SYSTEM MATCHES FreeBSD)
+ message(STATUS "Trying to enable ASM-ATT for Linux or FreeBSD on x86")
+ enable_language(ASM-ATT OPTIONAL)
+ if(CMAKE_ASM-ATT_COMPILER_WORKS)
+ message(STATUS "Trying to enable ASM-ATT for Linux/x86 - succeeded")
+ # this assembler file was created using gcc -S main.c
+ set(SRCS main-linux-x86-gas.s)
+ endif(CMAKE_ASM-ATT_COMPILER_WORKS)
+ endif(CMAKE_SYSTEM MATCHES Linux or CMAKE_SYSTEM MATCHES FreeBSD)
+endif(NOT SRCS AND CMAKE_SYSTEM_PROCESSOR MATCHES "[ix].?86$")
if(NOT SRCS)
message(STATUS "No assembler enabled, using C")