Skip to content

Commit

Permalink
Minor cmake change (#7058)
Browse files Browse the repository at this point in the history
* cmall cmake tweak

* cmall cmake tweak
  • Loading branch information
raver119 authored and sshepel committed Jan 23, 2019
1 parent 00937e7 commit d6b5ad7
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions libnd4j/tests_cpu/layers_tests/CMakeLists.txt
Expand Up @@ -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
Expand Down

0 comments on commit d6b5ad7

Please sign in to comment.