Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
merging master and develop before release
  • Loading branch information
bbercovici committed May 25, 2018
2 parents a84cfb5 + ab29c8d commit e3b12b6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ cmake_minimum_required(VERSION 2.8)

if (${USE_GCC})
include(cmake/FindOmpGcc.cmake)
else()
set(CMAKE_C_COMPILER /usr/bin/gcc CACHE STRING "C Compiler" FORCE)
set(CMAKE_CXX_COMPILER /usr/bin/g++ CACHE STRING "C++ Compiler" FORCE)
endif()

get_filename_component(dirName ${CMAKE_CURRENT_SOURCE_DIR} NAME)
Expand Down
9 changes: 6 additions & 3 deletions cmake/FindOmpGcc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ if(APPLE)
# If len == 0, nothing to do here
if(${len} EQUAL 0)
message("No OMP-compliant compiler was found on this Mac.")
set(CMAKE_C_COMPILER "/usr/bin/gcc" CACHE STRING "C Compiler" FORCE)
set(CMAKE_CXX_COMPILER "/usr/bin/g++" CACHE STRING "C++ Compiler" FORCE)
else()
# Looping over each directory to extract major/intermediate versions
foreach(dir ${compiler_dirs})
Expand Down Expand Up @@ -91,11 +93,12 @@ if(APPLE)
endif()
else()
message("No OMP-compliant compiler was found on this Mac.")
set(CMAKE_C_COMPILER "/usr/bin/gcc" CACHE STRING "C Compiler" FORCE)
set(CMAKE_CXX_COMPILER "/usr/bin/g++" CACHE STRING "C++ Compiler" FORCE)
endif()

else()
# Running on Linux. Will switch back to compiler in /usr/local/bin
message("Switching to /usr/local/gcc ")
set(CMAKE_C_COMPILER "/usr/local/bin/gcc" CACHE STRING "C Compiler" FORCE)
set(CMAKE_CXX_COMPILER "/usr/local/bin/g++" CACHE STRING "C++ Compiler" FORCE)
set(CMAKE_C_COMPILER "/usr/bin/gcc" CACHE STRING "C Compiler" FORCE)
set(CMAKE_CXX_COMPILER "/usr/bin/g++" CACHE STRING "C++ Compiler" FORCE)
endif()

0 comments on commit e3b12b6

Please sign in to comment.