diff --git a/libnd4j/tests_cpu/layers_tests/CMakeLists.txt b/libnd4j/tests_cpu/layers_tests/CMakeLists.txt index d8dc5d634afe..13c4d28a98ee 100644 --- a/libnd4j/tests_cpu/layers_tests/CMakeLists.txt +++ b/libnd4j/tests_cpu/layers_tests/CMakeLists.txt @@ -24,21 +24,19 @@ endif() # -fsanitize=address # -fsanitize=leak if (APPLE) - set(CMAKE_CXX_FLAGS " -O0 -g -fPIC -std=c++11 -fassociative-math -funsafe-math-optimizations -fmax-errors=2 -D__APPLE_OS__=true") + set(CMAKE_CXX_FLAGS " -fPIC -std=c++11 -fassociative-math -funsafe-math-optimizations -fmax-errors=2 -D__APPLE_OS__=true") elseif(WIN32) - set(CMAKE_CXX_FLAGS " -g -fPIC -std=c++11 -fassociative-math -funsafe-math-optimizations -fmax-errors=2") + set(CMAKE_CXX_FLAGS " -fPIC -std=c++11 -fassociative-math -funsafe-math-optimizations -fmax-errors=2") else() # OR CMAKE_BUILD_TYPE STREQUAL "Release" - if ("${_RELEASE}") - set(CMAKE_CXX_FLAGS "-O3 -fPIC -std=c++11 -fassociative-math -funsafe-math-optimizations -fmax-errors=2") - if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64*") - set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -mcpu=native") - else() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - endif() + set(CMAKE_CXX_FLAGS " -fPIC -std=c++11 -fassociative-math -funsafe-math-optimizations -fmax-errors=2") + if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64*") + set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -mcpu=native") else() - set(CMAKE_CXX_FLAGS " -g -O0 -fPIC -std=c++11 -fassociative-math -funsafe-math-optimizations -fmax-errors=2 -fsanitize=address") + set(CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS}") endif() + + set(CMAKE_CXX_FLAGS_DEBUG " ${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address") endif() # TODO: get rid of this once problem confirmed solved