Skip to content
Snippets Groups Projects
Commit 30849133 authored by Matteo Cicuttin's avatar Matteo Cicuttin
Browse files

Fixed linking in fd_catalog.

parent f0386bda
No related branches found
No related tags found
No related merge requests found
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
project(fd_catalog)
cmake_minimum_required(VERSION 3.10)
include(CheckLanguage)
find_package(CUDA)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
option(ENABLE_CUDA "Enable CUDA if present" ON)
if (ENABLE_CUDA)
check_language(CUDA)
if (CMAKE_CUDA_COMPILER)
enable_language(CUDA)
set(CMAKE_CUDA_STANDARD 14)
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
add_definitions(-DHAVE_CUDA)
set(HAVE_CUDA TRUE)
endif()
endif()
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASEASSERT "-O3 -g -fpermissive")
option(ENABLE_SINGLE "Enable single precision build" ON)
if (ENABLE_SINGLE)
if (HAVE_CUDA)
add_executable(fd_catalog_single fd_main.cpp fd_wave_cuda.cu)
if(APPLE)
set_property(TARGET fd_catalog_single PROPERTY BUILD_RPATH /usr/local/cuda/lib)
endif()
else()
add_executable(fd_catalog_single fd_main.cpp)
endif()
target_compile_definitions(fd_catalog_single PUBLIC -DSINGLE_PRECISION)
endif()
option(ENABLE_DOUBLE "Enable double precision build" ON)
if (ENABLE_DOUBLE)
if (HAVE_CUDA)
add_executable(fd_catalog_double fd_main.cpp fd_wave_cuda.cu)
if(APPLE)
set_property(TARGET fd_catalog_double PROPERTY BUILD_RPATH /usr/local/cuda/lib)
endif()
else()
add_executable(fd_catalog_double fd_main.cpp)
endif()
endif()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment