echo "

_______1: 
clang++ -o cudatest cudatest.cu -lopencv_core -stdlib=libc++ -std=c++11 && ./cudatest"
clang++ -o cudatest cudatest.cu -lopencv_core -stdlib=libc++ -std=c++11 && ./cudatest &&
echo "
___should have printed:
Hello World:
[1, 0;
  0, 1]
after opencv:"

echo "

_______2:
clang++ -o cudatest cudatest.cu -lopencv_core -stdlib=libstdc++ -std=c++11 && ./cudatest"
clang++ -o cudatest cudatest.cu -lopencv_core -stdlib=libstdc++ -std=c++11 && ./cudatest &&
echo "
___should have printed:
Hello World:"

echo "

_______3:
nvcc -o cudatest cudatest.cu -lopencv_core"
nvcc -o cudatest cudatest.cu -lopencv_core
echo '
___should have printed:
/usr/local/include/opencv2/core/mat.hpp(117): error: type name is not allowed

/usr/local/include/opencv2/core/mat.hpp(117): error: identifier "_Atomic" is undefined

/usr/local/include/opencv2/core/mat.hpp(117): error: expected an expression

/usr/local/include/opencv2/core/mat.hpp(117): error: identifier "__c11_atomic_fetch_add" is undefined

/usr/local/include/opencv2/core/mat.hpp(286): error: type name is not allowed

...'

echo "

_______4:
nvcc -o cudatest cudatest.cu --ptxas-options=-v -lopencv_core  -ccbin=clang++ -Xcompiler -std=c++11 -Xlinker -stdlib=libstdc++"
nvcc -o cudatest cudatest.cu --ptxas-options=-v -lopencv_core  -ccbin=clang++ -Xcompiler -std=c++11 -Xlinker -stdlib=libstdc++
echo '
___should have printed:
/Developer/NVIDIA/CUDA-6.5/bin/../include/common_functions.h(145): warning: allowing all exceptions is incompatible with previous function "operator new(size_t)"
/usr/include/c++/4.2.1/new(99): here

/Developer/NVIDIA/CUDA-6.5/bin/../include/common_functions.h(146): warning: allowing all exceptions is incompatible with previous function "operator new[](size_t)"
/usr/include/c++/4.2.1/new(100): here

/usr/local/include/opencv2/core/mat.hpp(117): error: type name is not allowed

/usr/local/include/opencv2/core/mat.hpp(117): error: identifier "_Atomic" is undefined

/usr/local/include/opencv2/core/mat.hpp(117): error: expected an expression

/usr/local/include/opencv2/core/mat.hpp(117): error: identifier "__c11_atomic_fetch_add" is undefined

/usr/local/include/opencv2/core/mat.hpp(286): error: type name is not allowed

...'

