Fix CMake functions case.
GitOrigin-RevId: abf1969eb50248a30ece29bbd4b38f3dace28788
This commit is contained in:
parent
0f0e5de3f2
commit
162e185565
@ -13,7 +13,7 @@ if (READLINE_INCLUDE_DIR AND READLINE_LIBRARY AND NOT GNU_READLINE_FOUND)
|
||||
set(CMAKE_REQUIRED_LIBRARIES "${READLINE_LIBRARY}")
|
||||
include(CheckCXXSourceCompiles)
|
||||
unset(GNU_READLINE_FOUND CACHE)
|
||||
CHECK_CXX_SOURCE_COMPILES("#include <stdio.h>\n#include <readline/readline.h>\nint main() { rl_replace_line(\"\", 0); }" GNU_READLINE_FOUND)
|
||||
check_cxx_source_compiles("#include <stdio.h>\n#include <readline/readline.h>\nint main() { rl_replace_line(\"\", 0); }" GNU_READLINE_FOUND)
|
||||
if (NOT GNU_READLINE_FOUND)
|
||||
unset(READLINE_INCLUDE_DIR CACHE)
|
||||
unset(READLINE_LIBRARY CACHE)
|
||||
@ -21,5 +21,5 @@ if (READLINE_INCLUDE_DIR AND READLINE_LIBRARY AND NOT GNU_READLINE_FOUND)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Readline DEFAULT_MSG READLINE_INCLUDE_DIR READLINE_LIBRARY)
|
||||
find_package_handle_standard_args(Readline DEFAULT_MSG READLINE_INCLUDE_DIR READLINE_LIBRARY)
|
||||
mark_as_advanced(READLINE_INCLUDE_DIR READLINE_LIBRARY)
|
||||
|
@ -117,14 +117,14 @@ include(CheckCXXCompilerFlag)
|
||||
|
||||
if (GCC OR CLANG OR INTEL)
|
||||
if (WIN32 AND INTEL)
|
||||
SET(STD14_FLAG /Qstd=c++14)
|
||||
set(STD14_FLAG /Qstd=c++14)
|
||||
else()
|
||||
SET(STD14_FLAG -std=c++14)
|
||||
set(STD14_FLAG -std=c++14)
|
||||
endif()
|
||||
CHECK_CXX_COMPILER_FLAG(${STD14_FLAG} HAVE_STD14)
|
||||
check_cxx_compiler_flag(${STD14_FLAG} HAVE_STD14)
|
||||
if (NOT HAVE_STD14)
|
||||
string(REPLACE "c++14" "c++1y" STD14_FLAG "${STD14_FLAG}")
|
||||
CHECK_CXX_COMPILER_FLAG(${STD14_FLAG} HAVE_STD1Y)
|
||||
check_cxx_compiler_flag(${STD14_FLAG} HAVE_STD1Y)
|
||||
set(HAVE_STD14 ${HAVE_STD1Y})
|
||||
endif()
|
||||
elseif (MSVC)
|
||||
@ -160,7 +160,7 @@ elseif (CLANG OR GCC)
|
||||
endif()
|
||||
|
||||
if (MEMPROF)
|
||||
CHECK_CXX_COMPILER_FLAG(-no-pie CXX_NO_PIE_FLAG)
|
||||
check_cxx_compiler_flag(-no-pie CXX_NO_PIE_FLAG)
|
||||
if (CXX_NO_PIE_FLAG)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -no-pie")
|
||||
elseif (APPLE)
|
||||
|
Loading…
Reference in New Issue
Block a user