On 12/22/2010 4:15 PM, Richard Wackerbarth wrote:
The problem is that CMake does not call the linker. It invokes the linker by 
calling the compiler and passing flags through it.

In the module, Darwin.cmake, you find:


SET(CMAKE_C_LINK_FLAGS "-Wl,-headerpad_max_install_names")
SET(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names")


But in Darwin-icc.cmake, you find:

SET(CMAKE_C_LINK_FLAGS "-headerpad_max_install_names")
SET(CMAKE_CXX_LINK_FLAGS "-headerpad_max_install_names")

Changing the latter to match the former should fix the issue.

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. Right now the Mac is using the older style program name matching. mpicc is matching icc, and so CMake tries to use the intel compiler settings when mpicc is used. I bet if you created an alias for mpicc to mpigcc it might work...


-Bill
_______________________________________________
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

Reply via email to