mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Cmake build: Show the found flag for use of c++11 features
This commit is contained in:
parent
7d5b1fb840
commit
371fdb8649
@ -77,6 +77,8 @@ int main() {
|
|||||||
")
|
")
|
||||||
|
|
||||||
# check c compiler
|
# check c compiler
|
||||||
|
set(SAFE_CMAKE_REQUIRED_QUIET ${CMAKE_REQUIRED_QUIET})
|
||||||
|
set(CMAKE_REQUIRED_QUIET ON)
|
||||||
FOREACH(FLAG ${CXX11_FLAG_CANDIDATES})
|
FOREACH(FLAG ${CXX11_FLAG_CANDIDATES})
|
||||||
SET(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
|
SET(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
|
||||||
SET(CMAKE_REQUIRED_FLAGS "${FLAG}")
|
SET(CMAKE_REQUIRED_FLAGS "${FLAG}")
|
||||||
@ -85,9 +87,11 @@ FOREACH(FLAG ${CXX11_FLAG_CANDIDATES})
|
|||||||
SET(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
|
SET(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
|
||||||
IF(CXX11_FLAG_DETECTED)
|
IF(CXX11_FLAG_DETECTED)
|
||||||
SET(CXX11_FLAG "${FLAG}")
|
SET(CXX11_FLAG "${FLAG}")
|
||||||
|
message(STATUS "CXX11_FLAG_DETECTED = \"${FLAG}\"")
|
||||||
BREAK()
|
BREAK()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
|
set(CMAKE_REQUIRED_QUIET ${SAFE_CMAKE_REQUIRED_QUIET})
|
||||||
|
|
||||||
# handle the standard arguments for find_package
|
# handle the standard arguments for find_package
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CXX11Compiler DEFAULT_MSG CXX11_FLAG)
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CXX11Compiler DEFAULT_MSG CXX11_FLAG)
|
||||||
|
Loading…
Reference in New Issue
Block a user