summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2011-07-19 15:53:31 (GMT)
committerDavid Cole <david.cole@kitware.com>2011-07-19 15:53:31 (GMT)
commit1a53fb7537c6f37f8ccfa418919b332a4928679a (patch)
treee0624ce098332b17561b1ada252502408573dd10 /Tests
parent5f7acc8d75d736905d9f54badebc80ad196e8877 (diff)
downloadCMake-1a53fb7537c6f37f8ccfa418919b332a4928679a.zip
CMake-1a53fb7537c6f37f8ccfa418919b332a4928679a.tar.gz
CMake-1a53fb7537c6f37f8ccfa418919b332a4928679a.tar.bz2
Use correct default multiple architecture values in test
Even if CMAKE_OSX_ARCHITECTURES value is a single value...
Diffstat (limited to 'Tests')
-rw-r--r--Tests/Architecture/CMakeLists.txt19
1 files changed, 10 insertions, 9 deletions
diff --git a/Tests/Architecture/CMakeLists.txt b/Tests/Architecture/CMakeLists.txt
index c210727..927ce3f 100644
--- a/Tests/Architecture/CMakeLists.txt
+++ b/Tests/Architecture/CMakeLists.txt
@@ -1,8 +1,6 @@
cmake_minimum_required(VERSION 2.8)
project(Architecture C)
-set(archs i386 ppc)
-
function(test_for_xcode4 result_var)
set(${result_var} 0 PARENT_SCOPE)
if(APPLE)
@@ -19,10 +17,14 @@ endfunction()
test_for_xcode4(is_xcode4)
+set(arch0 i386)
+set(arch1 ppc)
+
if(is_xcode4)
# Xcode 4, use modern architectures as defaults
# Arch 'ppc' no longer works: tools no longer available starting with Xcode 4
- set(archs i386 x86_64)
+ set(arch0 i386)
+ set(arch1 x86_64)
endif()
add_library(foo foo.c)
@@ -34,12 +36,11 @@ if(CMAKE_OSX_ARCHITECTURES)
"Expected [${CMAKE_OSX_ARCHITECTURES}], got [${archs}]."
)
endif()
-endif()
-
-list(LENGTH archs archs_len)
-if(archs_len GREATER 1)
- list(GET archs 0 arch0)
- list(GET archs 1 arch1)
+ list(LENGTH archs archs_len)
+ if(archs_len GREATER 1)
+ list(GET archs 0 arch0)
+ list(GET archs 1 arch1)
+ endif()
endif()
message("is_xcode4='${is_xcode4}'")