Skip to content

Commit

Permalink
Fix CMake functions case.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: abf1969eb50248a30ece29bbd4b38f3dace28788
  • Loading branch information
levlam committed Jun 12, 2018
1 parent 0f0e5de commit 162e185
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions CMake/FindReadline.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ 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)
endif()
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)
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 162e185

Please sign in to comment.