Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes for gcc 5.xx #288

Merged
merged 1 commit into from
Jun 4, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion lib/THCUNN/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,18 @@ IF(NOT Torch_FOUND)
ENDIF()

IF(NOT CUDA_FOUND)
FIND_PACKAGE(CUDA 4.0 REQUIRED)
FIND_PACKAGE(CUDA 6.5 REQUIRED)
ENDIF()

if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.9.3")
if(CUDA_VERSION VERSION_LESS "8.0")
MESSAGE(STATUS "Found gcc >=5 and CUDA <= 7.5, adding workaround C++ flags")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORCE_INLINES")
endif(CUDA_VERSION VERSION_LESS "8.0")
endif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.9.3")
endif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")

IF(NOT THCUNN_INSTALL_LIB_SUBDIR)
SET(THCUNN_INSTALL_LIB_SUBDIR "lib" CACHE PATH "THCUNN install library directory")
ENDIF()
Expand Down