Created
July 8, 2014 00:50
-
-
Save jowens/900eece341cfefb47fc0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") | |
# also see how to do overrides: | |
# https://gist.github.com/robertmaynard/11297565 | |
# comment from @jowens: | |
# this clang compiler version must be at least r201031, since that | |
# fixes a template bug in clang. | |
# http://llvm.org/bugs/show_bug.cgi?id=18009 | |
# ALSO it must be named "clang"/"clang++", or else cmake goes | |
# bananas. (Naming it "clang-mp-3.5", the name under which MacPorts | |
# installs it, does not work.) | |
# The hardwired-to-jowens shell script below is a two-line sh script | |
# to a MacPorts llvm-3.5 (top-of-tree) install: | |
# #!/bin/sh | |
# exec /opt/local/libexec/llvm-3.5/bin/clang "${@}" | |
set( CUDA_HOST_COMPILER /Users/jowens/bin/clang/clang++ CACHE FILEPATH | |
"Host side compiler used by NVCC" | |
FORCE ) | |
set(CMAKE_C_COMPILER /Users/jowens/bin/clang/clang CACHE FILEPATH | |
"C compiler" | |
FORCE ) | |
set(CMAKE_CXX_COMPILER /Users/jowens/bin/clang/clang++ CACHE FILEPATH | |
"CXX compiler" | |
FORCE ) | |
# current CUDA on Mavericks uses libstdc++, not libc++ | |
# https://github.com/cudpp/cudpp/wiki/BuildingCUDPPWithMavericks | |
set(CMAKE_CXX_FLAGS -stdlib=libstdc++) | |
set(CMAKE_C_FLAGS -stdlib=libstdc++) | |
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment