Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Nektar
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Bing Yuan
Nektar
Commits
4414bff3
Commit
4414bff3
authored
Apr 11, 2017
by
David Moxey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add CMake options for versions less than 3.1, and update .clang-format to C++11 standard
parent
c094be96
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
.clang-format
.clang-format
+1
-1
CMakeLists.txt
CMakeLists.txt
+19
-3
No files found.
.clang-format
View file @
4414bff3
...
...
@@ -11,6 +11,6 @@ AllowShortCaseLabelsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
IndentCaseLabels: true
Standard: Cpp
03
Standard: Cpp
11
AccessModifierOffset: -4
BinPackParameters: true
CMakeLists.txt
View file @
4414bff3
...
...
@@ -4,15 +4,31 @@ options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release
RelWithDebInfo MinSizeRel."
)
PROJECT
(
Nektar++ C CXX
)
SET
(
CMAKE_CXX_STANDARD 11
)
# Nektar++ requires C++11. Try to infer this for older CMake versions (less than
# 3.1.0)
IF
(
"
${
CMAKE_VERSION
}
"
VERSION_LESS
"3.1"
)
INCLUDE
(
CheckCXXCompilerFlag
)
CHECK_CXX_COMPILER_FLAG
(
"-std=c++11"
COMPILER_SUPPORTS_CXX11
)
IF
(
COMPILER_SUPPORTS_CXX11
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++11"
)
ELSE
()
MESSAGE
(
STATUS
"Nektar++ requires a compiler with C++11 support."
)
ENDIF
()
ELSE
()
SET
(
CMAKE_CXX_STANDARD 11
)
SET
(
CMAKE_CXX_STANDARD_REQUIRED ON
)
SET
(
CMAKE_CXX_EXTENSIONS OFF
)
ENDIF
()
INCLUDE
(
CheckLanguage
)
CHECK_LANGUAGE
(
Fortran
)
IF
(
CMAKE_Fortran_COMPILER
)
ENABLE_LANGUAGE
(
Fortran
)
ENABLE_LANGUAGE
(
Fortran
)
ELSE
()
MESSAGE
(
STATUS
"No Fortran support"
)
MESSAGE
(
STATUS
"No Fortran support"
)
ENDIF
()
# Helps organize projects in IDEs.
...
...
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