Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
CLHEP
CLHEP
Commits
4cc403a8
Commit
4cc403a8
authored
Sep 18, 2017
by
Lynn Garren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes to support c++17 for
CLHEP-144
parent
0ad93737
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
75 additions
and
0 deletions
+75
-0
ChangeLog
ChangeLog
+6
-0
Utility/ChangeLog
Utility/ChangeLog
+5
-0
cmake/Modules/ClhepVariables.cmake
cmake/Modules/ClhepVariables.cmake
+64
-0
No files found.
ChangeLog
View file @
4cc403a8
2017-09-18 Lynn Garren <garren@fnal.gov>
* support c++17 and c++1z (see CLHEP-144)
code contributed by Chris Green
==============================
21.03.17 Release CLHEP-2.3.4.4
==============================
...
...
Utility/ChangeLog
View file @
4cc403a8
2017-09-18 Lynn Garren <garren@fnal.gov>
* test: remove unused test .cc files to avoid confusion
==============================
21.03.17 Release CLHEP-2.3.4.4
==============================
...
...
cmake/Modules/ClhepVariables.cmake
View file @
4cc403a8
...
...
@@ -184,6 +184,66 @@ macro( _clhep_verify_cxx14 )
endif
()
endmacro
(
_clhep_verify_cxx14
)
macro
(
_clhep_verify_cxx1z
)
if
(
${
CMAKE_CXX_COMPILER_ID
}
STREQUAL
"Clang"
)
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0
)
message
(
FATAL_ERROR
"c++1z extension is not available for
${
CMAKE_CXX_COMPILER_ID
}${
CMAKE_CXX_COMPILER_VERSION
}
"
)
else
()
set
(
HAVE_STDCXX true
)
endif
()
elseif
(
${
CMAKE_CXX_COMPILER_ID
}
STREQUAL
"AppleClang"
)
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0
)
message
(
FATAL_ERROR
"c++1z extension is not available for
${
CMAKE_CXX_COMPILER_ID
}${
CMAKE_CXX_COMPILER_VERSION
}
"
)
else
()
set
(
HAVE_STDCXX true
)
endif
()
elseif
(
${
CMAKE_CXX_COMPILER_ID
}
STREQUAL
"Intel"
)
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17.0
)
message
(
FATAL_ERROR
"c++1z extension is not available for
${
CMAKE_CXX_COMPILER_ID
}
${
CMAKE_CXX_COMPILER_VERSION
}
"
)
else
()
set
(
HAVE_STDCXX true
)
endif
()
elseif
(
CMAKE_COMPILER_IS_GNUCXX
)
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0
)
message
(
FATAL_ERROR
"c++1z extension is not available for
${
CMAKE_CXX_COMPILER
}
"
)
else
()
set
(
HAVE_STDCXX true
)
endif
()
else
()
message
(
STATUS
"clhep_set_compiler_flags: Do not know how to set c++1z extensions for
${
CMAKE_CXX_COMPILER_ID
}
"
)
endif
()
endmacro
(
_clhep_verify_cxx1z
)
macro
(
_clhep_verify_cxx17
)
if
(
${
CMAKE_CXX_COMPILER_ID
}
STREQUAL
"Clang"
)
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0
)
message
(
FATAL_ERROR
"c++17 extension is not available for
${
CMAKE_CXX_COMPILER_ID
}${
CMAKE_CXX_COMPILER_VERSION
}
"
)
else
()
set
(
HAVE_STDCXX true
)
endif
()
elseif
(
${
CMAKE_CXX_COMPILER_ID
}
STREQUAL
"AppleClang"
)
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0
)
message
(
FATAL_ERROR
"c++17 extension is not available for
${
CMAKE_CXX_COMPILER_ID
}${
CMAKE_CXX_COMPILER_VERSION
}
"
)
else
()
set
(
HAVE_STDCXX true
)
endif
()
elseif
(
${
CMAKE_CXX_COMPILER_ID
}
STREQUAL
"Intel"
)
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0
)
message
(
FATAL_ERROR
"c++17 extension is not available for
${
CMAKE_CXX_COMPILER_ID
}
${
CMAKE_CXX_COMPILER_VERSION
}
"
)
else
()
set
(
HAVE_STDCXX true
)
endif
()
elseif
(
CMAKE_COMPILER_IS_GNUCXX
)
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.4.0
)
message
(
FATAL_ERROR
"c++17 extension is not available for
${
CMAKE_CXX_COMPILER
}
"
)
else
()
set
(
HAVE_STDCXX true
)
endif
()
else
()
message
(
STATUS
"clhep_set_compiler_flags: Do not know how to set c++17 extensions for
${
CMAKE_CXX_COMPILER_ID
}
"
)
endif
()
endmacro
(
_clhep_verify_cxx17
)
macro
(
_clhep_check_cxxstd
)
if
(
CLHEP_DEBUG_MESSAGES
)
message
(
STATUS
"_clhep_check_cxxstd debug: CMAKE_CXX_COMPILER:
${
CMAKE_CXX_COMPILER
}
"
)
...
...
@@ -201,6 +261,10 @@ macro( _clhep_check_cxxstd )
_clhep_verify_cxx1y
()
elseif
(
"
${
CLHEP_BUILD_CXXSTD
}
"
STREQUAL
"-std=c++14"
)
_clhep_verify_cxx14
()
elseif
(
"
${
CLHEP_BUILD_CXXSTD
}
"
STREQUAL
"-std=c++1z"
)
_clhep_verify_cxx1z
()
elseif
(
"
${
CLHEP_BUILD_CXXSTD
}
"
STREQUAL
"-std=c++17"
)
_clhep_verify_cxx17
()
elseif
(
DEFINED CLHEP_BUILD_CXXSTD
)
message
(
FATAL_ERROR
"
${
CLHEP_BUILD_CXXSTD
}
is not supported. Supported extensions are c++11, c++1y, and c++14."
)
else
()
...
...
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