StephanPreibisch / FourierConvolutionCUDALib

Implementation of 3d non-separable convolution using CUDA & FFT Convolution
20 stars 13 forks source link

Use libc++ instead of libstdc++ on Mac #12

Closed maweigert closed 8 years ago

maweigert commented 8 years ago

Hey,

On my Mac (10.10.5, clang Apple LLVM version 7.0.2 , cmake version 2.8.12.1) the build fails with a ld: symbol(s) not found for architecture x86_64 error, which is caused by linking against libstdc++ instead of the Mac native libc++ .

You should probably just change line 87 in CMakeLists.txt to

IF(APPLE) SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -stdlib=libc++") ELSE(APPLE) SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -stdlib=libstdc++") ENDIF(APPLE)

which makes it build again.

psteinb commented 8 years ago

I added your suggested fix with adfde1e18b6cfd01bfe8807dafd37a371874525c

I'll close this ticket as soon as the code runs on my osx build bot.

psteinb commented 8 years ago

watchout that nvcc 7.0 doesn't play well with boost 1.58 and above on OSX 10.10.5 Yosemite