Commit 77ec219d authored by Sergei Golubchik's avatar Sergei Golubchik

cmake: mark AIO_LIBRARY, EVENT_LIBRARY, GROFF, NROFF as advanced;

use -ggdb3 if supported
parent 57d15d62
...@@ -61,6 +61,7 @@ IF(UNIX AND NOT APPLE) ...@@ -61,6 +61,7 @@ IF(UNIX AND NOT APPLE)
# Compiling with PIC speeds up embedded build, on PIC sensitive systems # Compiling with PIC speeds up embedded build, on PIC sensitive systems
# Predefine it to OFF in release builds, because of the performance penalty # Predefine it to OFF in release builds, because of the performance penalty
SET(WITH_PIC ${WITH_PIC_DEFAULT} CACHE BOOL "Compile with PIC.") SET(WITH_PIC ${WITH_PIC_DEFAULT} CACHE BOOL "Compile with PIC.")
MARK_AS_ADVANCED(WITH_PIC)
ENDIF() ENDIF()
# Optionally set project name, e.g. # Optionally set project name, e.g.
...@@ -263,6 +264,10 @@ IF (ENABLE_GCOV AND NOT WIN32 AND NOT APPLE) ...@@ -263,6 +264,10 @@ IF (ENABLE_GCOV AND NOT WIN32 AND NOT APPLE)
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage -lgcov") SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage -lgcov")
ENDIF() ENDIF()
MY_CHECK_C_COMPILER_FLAG(-ggdb3 HAVE_GGDB3)
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ggdb3")
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb3")
OPTION(ENABLED_LOCAL_INFILE OPTION(ENABLED_LOCAL_INFILE
"If we should should enable LOAD DATA LOCAL by default" ${IF_WIN}) "If we should should enable LOAD DATA LOCAL by default" ${IF_WIN})
MARK_AS_ADVANCED(ENABLED_LOCAL_INFILE) MARK_AS_ADVANCED(ENABLED_LOCAL_INFILE)
......
...@@ -370,4 +370,5 @@ SET(HAVE_SYS_UTSNAME_H CACHE INTERNAL "") ...@@ -370,4 +370,5 @@ SET(HAVE_SYS_UTSNAME_H CACHE INTERNAL "")
SET(HAVE_PTHREAD_ATTR_GETGUARDSIZE CACHE INTERNAL "") SET(HAVE_PTHREAD_ATTR_GETGUARDSIZE CACHE INTERNAL "")
SET(HAVE_UCONTEXT_H CACHE INTERNAL "") SET(HAVE_UCONTEXT_H CACHE INTERNAL "")
SET(HAVE_SOCKPEERCRED CACHE INTERNAL "") SET(HAVE_SOCKPEERCRED CACHE INTERNAL "")
ENDIF() SET(HAVE_GGDB3 CACHE INTERNAL "")
ENDIF(MSVC)
...@@ -30,6 +30,8 @@ TARGET_LINK_LIBRARIES(factorial dbug) ...@@ -30,6 +30,8 @@ TARGET_LINK_LIBRARIES(factorial dbug)
IF(NOT WIN32 AND NOT CMAKE_GENERATOR MATCHES Xcode) IF(NOT WIN32 AND NOT CMAKE_GENERATOR MATCHES Xcode)
FIND_PROGRAM(GROFF groff) FIND_PROGRAM(GROFF groff)
FIND_PROGRAM(NROFF nroff) FIND_PROGRAM(NROFF nroff)
MARK_AS_ADVANCED(GROFF)
MARK_AS_ADVANCED(NROFF)
SET(OUTPUT_INC output1.r output2.r output3.r output4.r output5.r) SET(OUTPUT_INC output1.r output2.r output3.r output4.r output5.r)
SET(SOURCE_INC factorial.r main.r example1.r example2.r example3.r) SET(SOURCE_INC factorial.r main.r example1.r example2.r example3.r)
ADD_CUSTOM_COMMAND(OUTPUT ${OUTPUT_INC} ADD_CUSTOM_COMMAND(OUTPUT ${OUTPUT_INC}
......
...@@ -27,6 +27,7 @@ IF(UNIX) ...@@ -27,6 +27,7 @@ IF(UNIX)
SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
ENDIF() ENDIF()
FIND_LIBRARY(AIO_LIBRARY aio) FIND_LIBRARY(AIO_LIBRARY aio)
MARK_AS_ADVANCED(AIO_LIBRARY)
IF(AIO_LIBRARY) IF(AIO_LIBRARY)
CHECK_LIBRARY_EXISTS(${AIO_LIBRARY} io_queue_init "" HAVE_LIBAIO) CHECK_LIBRARY_EXISTS(${AIO_LIBRARY} io_queue_init "" HAVE_LIBAIO)
IF(HAVE_LIBAIO AND HAVE_LIBAIO_H) IF(HAVE_LIBAIO AND HAVE_LIBAIO_H)
......
...@@ -31,6 +31,7 @@ INSTALL(TARGETS mysql_client_test DESTINATION ${INSTALL_BINDIR} COMPONENT Test) ...@@ -31,6 +31,7 @@ INSTALL(TARGETS mysql_client_test DESTINATION ${INSTALL_BINDIR} COMPONENT Test)
CHECK_INCLUDE_FILE(event.h HAVE_EVENT_H) CHECK_INCLUDE_FILE(event.h HAVE_EVENT_H)
FIND_LIBRARY(EVENT_LIBRARY event) FIND_LIBRARY(EVENT_LIBRARY event)
MARK_AS_ADVANCED(EVENT_LIBRARY)
IF(HAVE_EVENT_H AND EVENT_LIBRARY) IF(HAVE_EVENT_H AND EVENT_LIBRARY)
ADD_EXECUTABLE(async_queries async_queries.c) ADD_EXECUTABLE(async_queries async_queries.c)
TARGET_LINK_LIBRARIES(async_queries mysqlclient ${EVENT_LIBRARY}) TARGET_LINK_LIBRARIES(async_queries mysqlclient ${EVENT_LIBRARY})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment