Commit c28c2e91 authored by Rashad Kanavath's avatar Rashad Kanavath

SuperBuild: comp: pass cxx and c compiler for cmake in unix

parent ad15fa29
......@@ -136,29 +136,22 @@ if(UNIX)
list(APPEND SB_CMAKE_CACHE_ARGS "-DCMAKE_INSTALL_RPATH:PATH=${CMAKE_INSTALL_RPATH}")
endif()
#RK: not sure we need to pass CC and CXX for all autoconf build
set(SB_CMAKE_ARGS "-G${CMAKE_GENERATOR}")
if(UNIX)
if(APPLE)
set(SB_ENV_CONFIGURE_CMD env CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER})
set(LDLIBVAR DYLD_LIBRARY_PATH)
else()
set(LDLIBVAR LD_LIBRARY_PATH)
#Do we really need to pass LD_LIBRARY_PATH here?
set(SB_ENV_CONFIGURE_CMD env ${LDLIBVAR}=${SB_INSTALL_PREFIX}/lib:$ENV{${LDLIBVAR}} CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER})
#RK: check with GP
# set(SB_CMAKE_COMMAND env ${LDLIBVAR}=${CMAKE_INSTALL_PREFIX}/lib:$ENV{${LDLIBVAR}} CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} ${CMAKE_COMMAND})
message(STATUS "Environment setup for Configure : ${SB_ENV_CONFIGURE_CMD}")
endif()
set(SB_ENV_CONFIGURE_CMD env ${LDLIBVAR}=${SB_INSTALL_PREFIX}/lib:$ENV{${LDLIBVAR}} CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER})
set(SB_CMAKE_COMMAND env ${LDLIBVAR}=${CMAKE_INSTALL_PREFIX}/lib:$ENV{${LDLIBVAR}} CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} ${CMAKE_COMMAND} ${SB_CMAKE_ARGS})
message(STATUS "Environment setup for Configure (SB_ENV_CONFIGURE_CMD): ${SB_ENV_CONFIGURE_CMD}")
message(STATUS "Environment setup for CMake (SB_CMAKE_COMMAND) : ${SB_CMAKE_COMMAND}")
else()
#windows
set(SB_CMAKE_COMMAND ${CMAKE_COMMAND} ${SB_CMAKE_ARGS})
endif()
set(SB_CMAKE_ARGS)
list(APPEND SB_CMAKE_ARGS "-G${CMAKE_GENERATOR}")
list(APPEND SB_CMAKE_ARGS "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}")
list(APPEND SB_CMAKE_ARGS "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}")
set(SB_CMAKE_COMMAND ${CMAKE_COMMAND} ${SB_CMAKE_ARGS})
set(FROM_SYSTEM_LIST)
set(FROM_SUPERBUILD_LIST)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment