Skip to content
Snippets Groups Projects
Commit 06c2b3e5 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Enabled g++ warnings and disabled false nvcc warnings

parent 40dacbba
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,7 @@ else()
endif()
# set Debug/Release options
set( CMAKE_CXX_FLAGS "-std=c++11" )
set( CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-unused-local-typedefs -Wno-unused-variable" )
set( CMAKE_CXX_FLAGS_DEBUG "-g" )
set( CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -DNDEBUG" )
#set( CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -DNDEBUG -ftree-vectorizer-verbose=1 -ftree-vectorize -fopt-info-vec-missed -funroll-loops" )
......@@ -68,6 +68,10 @@ if( WITH_CUDA STREQUAL "yes" )
set(BUILD_SHARED_LIBS ON)
set(CUDA_SEPARABLE_COMPILATION ON)
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} ;-DHAVE_CUDA)
# disable false compiler warnings
# reference for the -Xcudafe flag: http://stackoverflow.com/questions/14831051/how-to-disable-compiler-warnings-with-nvcc/17095910#17095910
# list of possible tokens: http://www.ssl.berkeley.edu/~jimm/grizzly_docs/SSL/opt/intel/cc/9.0/lib/locale/en_US/mcpcom.msg
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} ; --expt-relaxed-constexpr -Xcudafe "\"--diag_suppress=code_is_unreachable --diag_suppress=implicit_return_from_non_void_function\"")
#AddCompilerFlag( "-DHAVE_NOT_CXX11" ) # -U_GLIBCXX_ATOMIC_BUILTINS -U_GLIBCXX_USE_INT128 " )
set( ALL_CUDA_ARCHS -gencode arch=compute_20,code=sm_20
-gencode arch=compute_30,code=sm_30
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment