Mentions légales du service

Skip to content
Snippets Groups Projects
Commit ed251cfa authored by hhadjdji's avatar hhadjdji
Browse files

Set level-3 optimization for compiling on 'Unix' systems and enable symbol stripping.

About 1Mo of size gained for shared library.
parent c656d086
Branches
Tags 1.2.6
No related merge requests found
......@@ -60,11 +60,14 @@ if(WIN32)
target_compile_definitions(gm PRIVATE NOMINMAX)
endif()
if(UNIX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
# strip all symbols
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s")
endif()
find_package(Eigen3 REQUIRED)
if(EIGEN3_INCLUDE_DIR)
if(UNIX)
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -O3)
endif()
foreach(GM_SCALAR float double cuComplex cuDoubleComplex)# complex<float> complex<double>)
#string(REGEX REPLACE "<|>" "" GM_SCALAR ${GM_SCALAR})
set(GM_SCALAR_FILE build/test_gm_${GM_SCALAR}.cpp)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment