Skip to content

Commit

Permalink
Remove CMAKE_CXX_COMPILER and CMAKE_C_COMPILER for OSX (#719)
Browse files Browse the repository at this point in the history
* Remove CMAKE_CXX_COMPILER and CMAKE_C_COMPILER for OSX

* update .travis/test.sh

* update again
  • Loading branch information
henry0312 authored and chivee committed Jul 22, 2017
1 parent 36cf7e7 commit 6828461
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
9 changes: 9 additions & 0 deletions .travis/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ if [[ ${TASK} == "gpu" ]]; then
export CPLUS_INCLUDE_PATH="$HOME/miniconda/include:$AMDAPPSDK/include/:$CPLUS_INCLUDE_PATH"
fi

case ${TRAVIS_OS_NAME} in
osx)
export CXX=g++-7
export CC=gcc-7
;;
linux)
;;
esac

cd $TRAVIS_BUILD_DIR

if [[ ${TASK} == "pylint" ]]; then
Expand Down
7 changes: 1 addition & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
cmake_minimum_required(VERSION 2.8)

if(APPLE)
SET(CMAKE_CXX_COMPILER "g++-7")
SET(CMAKE_C_COMPILER "gcc-7")
endif()

PROJECT(lightgbm)

OPTION(USE_MPI "MPI based parallel learning" OFF)
Expand Down Expand Up @@ -136,4 +131,4 @@ install(TARGETS lightgbm _lightgbm
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib
ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)

install(DIRECTORY ${LightGBM_HEADER_DIR}/LightGBM DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
install(DIRECTORY ${LightGBM_HEADER_DIR}/LightGBM DESTINATION ${CMAKE_INSTALL_PREFIX}/include)

0 comments on commit 6828461

Please sign in to comment.