Skip to content

Commit

Permalink
common cmake include for setting compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire committed May 1, 2013
1 parent 0ab3b1a commit 82eb5c5
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
20 changes: 20 additions & 0 deletions CMakeCompiler.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# CMakeCompiler.txt
#
# Copyright (C) 2009-12 by RStudio, Inc.
#
# Unless you have received this program directly from RStudio pursuant
# to the terms of a commercial license agreement with RStudio, then
# this program is licensed to you under the terms of version 3 of the
# GNU Affero General Public License. This program is distributed WITHOUT
# ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
# AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
#
#

# use clang on osx
if(APPLE)
set(CMAKE_C_COMPILER /usr/bin/cc)
set(CMAKE_CXX_COMPILER /usr/bin/c++)
endif()
7 changes: 2 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@
#
#

# use clang on osx
if(APPLE)
set(CMAKE_C_COMPILER /usr/bin/cc)
set(CMAKE_CXX_COMPILER /usr/bin/c++)
endif()
# set compiler
include(CMakeCompiler.txt)

cmake_minimum_required(VERSION 2.6)
project (RStudio)
Expand Down
3 changes: 3 additions & 0 deletions src/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
#
#

# set compiler
include("${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeCompiler.txt")

# set minimum version
cmake_minimum_required(VERSION 2.6)

Expand Down

0 comments on commit 82eb5c5

Please sign in to comment.