diff options
author | David Cole <david.cole@kitware.com> | 2011-07-19 15:53:31 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2011-07-19 15:53:31 (GMT) |
commit | 1a53fb7537c6f37f8ccfa418919b332a4928679a (patch) | |
tree | e0624ce098332b17561b1ada252502408573dd10 /Tests/Architecture | |
parent | 5f7acc8d75d736905d9f54badebc80ad196e8877 (diff) | |
download | CMake-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/Architecture')
-rw-r--r-- | Tests/Architecture/CMakeLists.txt | 19 |
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}'") |