[CMake] problem with mac linker flags

David Cole david.cole at kitware.com
Wed Dec 22 17:58:43 EST 2010


I take that back..... Wait till tomorrow to follow this advice. :-)

Looks like Brad just pushed one more fix related to this issue to 'next'
this afternoon.



On Wed, Dec 22, 2010 at 5:57 PM, David Cole <david.cole at kitware.com> wrote:

> There were recent bug fixes pushed to CMake 'next' (and I believe now to
> 'master' as well) to address the "headerpad_max_install_names" portion of
> this discussion. It should be passed with "-Wl," now so that it passes
> through to the linker on the Mac.
>
> This particular error should go away if you use a nightly dev build of
> CMake.
>
> Try that and let us know if you get farther with nightly cmake.
>
>
> Thanks,
> David
>
>
>
> On Wed, Dec 22, 2010 at 5:34 PM, Richard Wackerbarth <richard at nfsnet.org>wrote:
>
>> On Dec 22, 2010, at 3:24 PM, Bill Hoffman wrote:
>>
>> > So, Darwin-icc.cmake is for the Intel compiler on the Mac.  The intel
>> compiler does not want and can not have the -Wl, syntax. These modules need
>> to be updated to the new way of handling compilers.
>>
>> If you will point me toward an example of "the new way", I will try to
>> generate some patches for your review.
>>
>> BTW, I been looking at some of this code in order to get ObjC to compile
>> correctly with different SDKs.
>>
>> In doing so, it appears that the cmSystemTools::FileFormat routines are no
>> longer used anywhere.
>> If I am correct, that code should be purged in order to minimize
>> confusion.
>>
>> From df901a217e1d0ed9e472472ca86d9ac5aa1e6db6 Mon Sep 17 00:00:00 2001
>> Date: Fri, 17 Dec 2010 18:32:05 -0600
>> Subject: [PATCH] File Format is now determined within the
>> Compiler-Specific Modules
>>
>> ---
>>  Source/cmSystemTools.cxx |   65
>> ----------------------------------------------
>>  Source/cmSystemTools.h   |   24 -----------------
>>  2 files changed, 0 insertions(+), 89 deletions(-)
>>
>> diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
>> index 7bc89a4..31ceaa3 100644
>> --- a/Source/cmSystemTools.cxx
>> +++ b/Source/cmSystemTools.cxx
>> @@ -1432,71 +1432,6 @@ bool cmSystemTools::SimpleGlob(const cmStdString&
>> glob,
>>   return res;
>>  }
>>
>> -cmSystemTools::FileFormat cmSystemTools::GetFileFormat(const char* cext)
>> -{
>> -  if ( ! cext || *cext == 0 )
>> -    {
>> -    return cmSystemTools::NO_FILE_FORMAT;
>> -    }
>> -  //std::string ext = cmSystemTools::LowerCase(cext);
>> -  std::string ext = cext;
>> -  if ( ext == "c" || ext == ".c" ||
>> -       ext == "m" || ext == ".m"
>> -    ) { return cmSystemTools::C_FILE_FORMAT; }
>> -  if (
>> -    ext == "C" || ext == ".C" ||
>> -    ext == "M" || ext == ".M" ||
>> -    ext == "c++" || ext == ".c++" ||
>> -    ext == "cc" || ext == ".cc" ||
>> -    ext == "cpp" || ext == ".cpp" ||
>> -    ext == "cxx" || ext == ".cxx" ||
>> -    ext == "mm" || ext == ".mm"
>> -    ) { return cmSystemTools::CXX_FILE_FORMAT; }
>> -  if (
>> -    ext == "f" || ext == ".f" ||
>> -    ext == "F" || ext == ".F" ||
>> -    ext == "f77" || ext == ".f77" ||
>> -    ext == "f90" || ext == ".f90" ||
>> -    ext == "for" || ext == ".for" ||
>> -    ext == "f95" || ext == ".f95"
>> -    ) { return cmSystemTools::FORTRAN_FILE_FORMAT; }
>> -  if ( ext == "java" || ext == ".java" )
>> -    { return cmSystemTools::JAVA_FILE_FORMAT; }
>> -  if (
>> -    ext == "H" || ext == ".H" ||
>> -    ext == "h" || ext == ".h" ||
>> -    ext == "h++" || ext == ".h++" ||
>> -    ext == "hm" || ext == ".hm" ||
>> -    ext == "hpp" || ext == ".hpp" ||
>> -    ext == "hxx" || ext == ".hxx" ||
>> -    ext == "in" || ext == ".in" ||
>> -    ext == "txx" || ext == ".txx"
>> -    ) { return cmSystemTools::HEADER_FILE_FORMAT; }
>> -  if ( ext == "rc" || ext == ".rc" )
>> -    { return cmSystemTools::RESOURCE_FILE_FORMAT; }
>> -  if ( ext == "def" || ext == ".def" )
>> -    { return cmSystemTools::DEFINITION_FILE_FORMAT; }
>> -  if ( ext == "lib" || ext == ".lib" ||
>> -       ext == "a" || ext == ".a")
>> -    { return cmSystemTools::STATIC_LIBRARY_FILE_FORMAT; }
>> -  if ( ext == "o" || ext == ".o" ||
>> -       ext == "obj" || ext == ".obj")
>> -    { return cmSystemTools::OBJECT_FILE_FORMAT; }
>> -#ifdef __APPLE__
>> -  if ( ext == "dylib" || ext == ".dylib" )
>> -    { return cmSystemTools::SHARED_LIBRARY_FILE_FORMAT; }
>> -  if ( ext == "so" || ext == ".so" ||
>> -       ext == "bundle" || ext == ".bundle" )
>> -    { return cmSystemTools::MODULE_FILE_FORMAT; }
>> -#else // __APPLE__
>> -  if ( ext == "so" || ext == ".so" ||
>> -       ext == "sl" || ext == ".sl" ||
>> -       ext == "dll" || ext == ".dll" )
>> -    { return cmSystemTools::SHARED_LIBRARY_FILE_FORMAT; }
>> -#endif // __APPLE__
>> -  return cmSystemTools::UNKNOWN_FILE_FORMAT;
>> -}
>> -
>>  bool cmSystemTools::Split(const char* s, std::vector<cmStdString>& l)
>>  {
>>   std::vector<std::string> temp;
>> diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
>> index 6f9147c..ad7ddc3 100644
>> --- a/Source/cmSystemTools.h
>> +++ b/Source/cmSystemTools.h
>> @@ -249,25 +249,6 @@ public:
>>   static void EnableRunCommandOutput() {s_DisableRunCommandOutput = false;
>> }
>>   static bool GetRunCommandOutput() { return s_DisableRunCommandOutput; }
>>
>> -  /**
>> -   * Come constants for different file formats.
>> -   */
>> -  enum FileFormat {
>> -    NO_FILE_FORMAT = 0,
>> -    C_FILE_FORMAT,
>> -    CXX_FILE_FORMAT,
>> -    FORTRAN_FILE_FORMAT,
>> -    JAVA_FILE_FORMAT,
>> -    HEADER_FILE_FORMAT,
>> -    RESOURCE_FILE_FORMAT,
>> -    DEFINITION_FILE_FORMAT,
>> -    STATIC_LIBRARY_FILE_FORMAT,
>> -    SHARED_LIBRARY_FILE_FORMAT,
>> -    MODULE_FILE_FORMAT,
>> -    OBJECT_FILE_FORMAT,
>> -    UNKNOWN_FILE_FORMAT
>> -  };
>> -
>>   enum CompareOp {
>>     OP_LESS,
>>     OP_GREATER,
>> @@ -280,11 +261,6 @@ public:
>>   static bool VersionCompare(CompareOp op, const char* lhs, const char*
>> rhs);
>>
>>   /**
>> -   * Determine the file type based on the extension
>> -   */
>> -  static FileFormat GetFileFormat(const char* ext);
>> -
>> -  /**
>>    * On Windows 9x we need a comspec (command.com) substitute to run
>>    * programs correctly. This string has to be constant available
>>    * through the running of program. This method does not create a copy.
>> --
>> 1.7.1+GitX
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101222/5c20708a/attachment.htm>


More information about the CMake mailing list