[cmake-developers] Cross-compiling with clang

Stephen Kelly steveire at gmail.com
Tue Jun 11 08:43:22 EDT 2013


Stephen Kelly wrote:

> # CMake workarounds
> set(CMAKE_EXE_LINKER_FLAGS ${CMAKE_TOOLCHAIN_LINK_FLAGS} CACHE INTERNAL
> "exe link flags")

Even with this hack, it doesn't work until I hack 
CMakeDetermineCompilerABI.cmake too to overwrite, not append:
 
diff --git a/Modules/CMakeDetermineCompilerABI.cmake 
b/Modules/CMakeDetermineCompilerABI.cmake
index 44cc04a..3416c10 100644
--- a/Modules/CMakeDetermineCompilerABI.cmake
+++ b/Modules/CMakeDetermineCompilerABI.cmake
@@ -26,7 +26,7 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
     set(BIN 
"${CMAKE_PLATFORM_INFO_DIR}/CMakeDetermineCompilerABI_${lang}.bin")
     set(CMAKE_FLAGS )
     if(DEFINED CMAKE_${lang}_VERBOSE_FLAG)
-      set(CMAKE_FLAGS "-
DCMAKE_EXE_LINKER_FLAGS=${CMAKE_${lang}_VERBOSE_FLAG}")
+      set(CMAKE_FLAGS "-DCMAKE_EXE_LINKER_FLAGS=${CMAKE_EXE_LINKER_FLAGS} 
${CMAKE_${lang}_VERBOSE_FLAG}")
     endif()
     if(CMAKE_${lang}_COMPILER_TARGET)


Thanks,

Steve.





More information about the cmake-developers mailing list