forked from rstudio/rstudio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeCompiler.txt
41 lines (34 loc) · 1.24 KB
/
CMakeCompiler.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#
# CMakeCompiler.txt
#
# Copyright (C) 2009-16 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)
if(NOT DEFINED CMAKE_C_COMPILER)
set(CMAKE_C_COMPILER /usr/bin/cc)
endif()
if(NOT DEFINED CMAKE_CXX_COMPILER)
set(CMAKE_CXX_COMPILER /usr/bin/c++)
endif()
endif()
# use Rtools on Windows (mainly for Qt Creator)
if(WIN32 AND NOT DEFINED RSTUDIO_PACKAGE_BUILD)
set(RTOOLS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../dependencies/windows/Rtools33")
string(REGEX REPLACE "/" "\\\\" RTOOLS_TOOLCHAIN_32BIT_PATH "${RTOOLS_PATH}/mingw_32/bin")
set(ENV{PATH} "${RTOOLS_TOOLCHAIN_32BIT_PATH}")
message(STATUS "The PATH is $ENV{PATH}")
endif()
# avoid colored output (seems unreliable in cmd.exe terminal)
if(WIN32)
set(CMAKE_COLOR_MAKEFILE OFF)
endif()