Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
np
nptool
Commits
afdb4c23
Commit
afdb4c23
authored
Jun 16, 2021
by
Adrien Matta
☠
Browse files
* Fixing issue when root is compiled with c++14 or above
parent
590c446b
Pipeline
#124450
passed with stages
in 9 minutes and 37 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
24 deletions
+24
-24
NPLib/ressources/CMake/NPTool_CMake_Preamble.cmake
NPLib/ressources/CMake/NPTool_CMake_Preamble.cmake
+24
-24
No files found.
NPLib/ressources/CMake/NPTool_CMake_Preamble.cmake
View file @
afdb4c23
...
...
@@ -48,27 +48,27 @@ execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
endif
()
endif
()
# Adjust the compiler language flag
set
(
NOCPPFLAGS true
)
if
(
${
CMAKE_CXX_FLAGS
}
MATCHES
".*std=.*11"
)
set
(
NOCPPFLAGS false
)
elseif
(
${
CMAKE_CXX_FLAGS
}
MATCHES
".*std=.*0x"
)
set
(
NOCPPFLAGS false
)
endif
()
include
(
CheckCXXCompilerFlag
)
if
(
NOCPPFLAGS
)
CHECK_CXX_COMPILER_FLAG
(
"-std=c++11"
COMPILER_SUPPORTS_CXX11
)
if
(
COMPILER_SUPPORTS_CXX11 AND NOT nocpp11
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++11"
)
else
()
CHECK_CXX_COMPILER_FLAG
(
"-std=c++0x"
COMPILER_SUPPORTS_CXX0X
)
endif
()
if
(
COMPILER_SUPPORTS_CXX0X AND NOT nocpp11
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++0x"
)
endif
()
endif
()
#
# Adjust the compiler language flag
#
set(NOCPPFLAGS true)
#
if(${CMAKE_CXX_FLAGS} MATCHES ".*std=.*11")
#
set(NOCPPFLAGS false)
#
elseif(${CMAKE_CXX_FLAGS} MATCHES ".*std=.*0x")
#
set(NOCPPFLAGS false)
#
endif()
#
#
include(CheckCXXCompilerFlag)
#
#
if(NOCPPFLAGS)
#
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
#
if(COMPILER_SUPPORTS_CXX11 AND NOT nocpp11)
#
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
#
else()
#
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
#
endif()
#
#
if(COMPILER_SUPPORTS_CXX0X AND NOT nocpp11)
#
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
#
endif()
#
endif()
#
#
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