-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove hard-coded cuda paths from CMakeLists and move source files to…
… source directory.
- Loading branch information
1 parent
4ddc1b8
commit 7f5fea7
Showing
11 changed files
with
42 additions
and
53 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
cmake_minimum_required(VERSION 2.8) | ||
project(lfd) | ||
|
||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules") | ||
|
||
# http://cmake.3232098.n2.nabble.com/Default-value-for-CMAKE-BUILD-TYPE-td7550756.html | ||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) | ||
message(STATUS "Setting build type to 'Release' as none was specified.") | ||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE) | ||
# Set the possible values of build type for cmake-gui | ||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" | ||
"MinSizeRel" "RelWithDebInfo") | ||
endif() | ||
|
||
set(CMAKE_CXX_FLAGS "-fPIC") | ||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) | ||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) | ||
set(BUILD_SHARED_LIBS true) | ||
|
||
# external libraries | ||
find_package(CUDA REQUIRED) | ||
find_package(Boost COMPONENTS python REQUIRED) | ||
|
||
include("${CMAKE_SOURCE_DIR}/cmake/boost-python.cmake") | ||
|
||
add_subdirectory(src) |
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
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
include_directories( | ||
${CMAKE_SOURCE_DIR}/src | ||
) | ||
|
||
add_subdirectory(tpsopt) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Append current NVCC flags by something, eg comput capability | ||
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} --gpu-architecture sm_20) | ||
|
||
## template for cuda -> boost python | ||
cuda_add_library(tps SHARED tps.cu) | ||
target_link_libraries(tps ${CUDA_LIBRARIES} ${CUDA_CUBLAS_LIBRARIES}) | ||
|
||
boost_python_module(cuda_funcs cuda_funcs.cpp) | ||
target_link_libraries(cuda_funcs tps) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.