Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ScalFMM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
solverstack
ScalFMM
Commits
b588fc15
Commit
b588fc15
authored
Sep 09, 2013
by
BRAMAS Berenger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change opti flags depending on compilation mode
parent
a2361a5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
12 deletions
+26
-12
CMakeLists.txt
CMakeLists.txt
+26
-12
No files found.
CMakeLists.txt
View file @
b588fc15
...
...
@@ -61,6 +61,19 @@ MESSAGE( STATUS "ScalFMM_BUILD_DEBUG = ${ScalFMM_BUILD_DEBUG}" )
if
(
ScalfMM_BUILD_DEBUG
)
SET
(
CMAKE_BUILD_TYPE Debug
)
ADD_DEFINITIONS
(
-O0
)
# Compile optimization
IF
(
APPLE
)
SET
(
SCALFMM_FLAGS_OPTI_DEBUG
"-m64 -march=native -funroll-loops"
CACHE STRING
"Set your optimization flags for debug mode."
)
ELSE
()
# Test if not apple and 64bits
if
(
CMAKE_SIZEOF_VOID_P EQUAL 8
)
SET
(
SCALFMM_FLAGS_OPTI_DEBUG
"-m64 -march=native -funroll-loops"
CACHE STRING
"Set your optimization flags for debug mode."
)
else
()
SET
(
SCALFMM_FLAGS_OPTI_DEBUG
"-march=native -funroll-loops"
CACHE STRING
"Set your optimization flags for debug mode."
)
endif
()
ENDIF
()
ADD_DEFINITIONS
(
${
SCALFMM_FLAGS_OPTI_DEBUG
}
)
else
()
SET
(
CMAKE_BUILD_TYPE Release
)
# force -O2 in release
...
...
@@ -70,6 +83,19 @@ else()
IF
(
CMAKE_CXX_COMPILER_ID STREQUAL
"Intel"
)
ADD_DEFINITIONS
(
-ip
)
ENDIF
()
# Compile optimization
IF
(
APPLE
)
SET
(
SCALFMM_FLAGS_OPTI_RELEASE
"-m64 -Ofast -march=native -funroll-loops"
CACHE STRING
"Set your optimization flags for release mode."
)
ELSE
()
# Test if not apple and 64bits
if
(
CMAKE_SIZEOF_VOID_P EQUAL 8
)
SET
(
SCALFMM_FLAGS_OPTI_RELEASE
"-m64 -Ofast -flto -march=native -funroll-loops"
CACHE STRING
"Set your optimization flags for release mode."
)
else
()
SET
(
SCALFMM_FLAGS_OPTI_RELEASE
"-Ofast -flto -march=native -funroll-loops"
CACHE STRING
"Set your optimization flags for release mode."
)
endif
()
ENDIF
()
ADD_DEFINITIONS
(
${
SCALFMM_FLAGS_OPTI_RELEASE
}
)
endif
()
# Attach source code to exec
...
...
@@ -110,18 +136,6 @@ ADD_DEFINITIONS(-Wall -Wshadow -Wpointer-arith -Wcast-qual -Wconversion -fpic -s
CONFIGURE_FILE
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/Src/ScalFmmConfig.h.cmake
${
CMAKE_BINARY_DIR
}
/Src/ScalFmmConfig.h
)
# Compile optimization
IF
(
APPLE
)
SET
(
SCALFMM_FLAGS_OPTI
"-m64 -Ofast -march=native -funroll-loops"
CACHE STRING
"Set your optimization flags."
)
ELSE
()
# Test if not apple and 64bits
if
(
CMAKE_SIZEOF_VOID_P EQUAL 8
)
SET
(
SCALFMM_FLAGS_OPTI
"-m64 -Ofast -flto -march=native -funroll-loops"
CACHE STRING
"Set your optimization flags."
)
else
()
SET
(
SCALFMM_FLAGS_OPTI
"-Ofast -flto -march=native -funroll-loops"
CACHE STRING
"Set your optimization flags."
)
endif
()
ENDIF
()
ADD_DEFINITIONS
(
${
SCALFMM_FLAGS_OPTI
}
)
# Use SSE
MESSAGE
(
STATUS
"ScalFMM_USE_SSE =
${
ScalFMM_USE_SSE
}
"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment