View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014668CMakeModulespublic2013-12-23 11:472014-06-02 08:37
Reportersezero 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionduplicate 
PlatformOSOS Version
Product VersionCMake 2.8.12 
Target VersionFixed in Version 
Summary0014668: Modules/Platform/Darwin.cmake failure with cross toolchain file
DescriptionUsing a toolchain file to test a linux-to-darwin cross-compile, I get
the following:

CMake Error at /usr/share/cmake/Modules/Platform/Darwin.cmake:344 (list):
  list sub-command REMOVE_DUPLICATES requires list to be present.
Call Stack (most recent call first):
  /usr/share/cmake/Modules/CMakeSystemSpecificInformation.cmake:36 (include)
Steps To Reproducecmake -DCMAKE_TOOLCHAIN_FILE=/path/to/Toolchain-OSX-ppc.cmake

FWIW, the toolchain file looks like this:

SET(CMAKE_SYSTEM_NAME Darwin)

SET(CMAKE_C_COMPILER /opt/cross_osx-ppc/bin/powerpc-apple-darwin9-gcc)
SET(CMAKE_CXX_COMPILER /opt/cross_osx-ppc/bin/powerpc-apple-darwin9-g++)

# where is the target environment
SET(CMAKE_FIND_ROOT_PATH /opt/cross_osx-ppc)

# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
Additional InformationLIST(REMOVE_DUPLICATES ...) seems sensitive to unset (non-existent)
variables, so applying the following patch makes it work for me:

--- Darwin.cmake~
+++ Darwin.cmake
@@ -341,7 +341,9 @@
     list(APPEND _apps_paths "${_apps}")
   endif()
 endforeach()
-list(REMOVE_DUPLICATES _apps_paths)
+if(_apps_paths)
+ list(REMOVE_DUPLICATES _apps_paths)
+endif()
 set(CMAKE_SYSTEM_APPBUNDLE_PATH
   ${_apps_paths})
 unset(_apps_paths)
TagsNo tags attached.
Attached Files

 Relationships
duplicate of 0014603closedBrad King Cross compiling for darwin fails 

  Notes
(0036066)
Robert Maynard (manager)
2014-06-02 08:37

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2013-12-23 11:47 sezero New Issue
2013-12-24 09:10 Brad King Relationship added duplicate of 0014603
2013-12-24 09:10 Brad King Status new => resolved
2013-12-24 09:10 Brad King Resolution open => duplicate
2013-12-24 09:10 Brad King Assigned To => Brad King
2014-06-02 08:37 Robert Maynard Note Added: 0036066
2014-06-02 08:37 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team