Cmake build: Removed some cmake warnings

This commit is contained in:
Kornel Benko 2019-03-26 10:00:35 +01:00
parent 7f0b0e3347
commit 80b3adc42a
3 changed files with 16 additions and 16 deletions

View File

@ -569,7 +569,7 @@ include(ProjectSourceGroup)
if(LYX_PROFILE AND NOT MSVC)
set(CMAKE_BUILD_TYPE Profile CACHE TYPE STRING FORCE)
set(CMAKE_BUILD_TYPE Profile CACHE STRING "Profile build type" FORCE)
set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE} -pg")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg")
else()
@ -619,12 +619,12 @@ if(NOT MSVC)
if(LYX_STDLIB_DEBUG)
set(LYX_CXX_FLAGS "${LYX_CXX_FLAGS} -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC")
endif()
set(CMAKE_CXX_FLAGS "${LYX_CXX_FLAGS} -fno-strict-aliasing " CACHE TYPE STRING FORCE)
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -D_DEBUG" CACHE TYPE STRING FORCE)
set(CMAKE_CXX_FLAGS "${LYX_CXX_FLAGS} -fno-strict-aliasing " CACHE STRING "Set CXX flags" FORCE)
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -D_DEBUG" CACHE STRING "Set debug flags" FORCE)
if(MINGW)
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG" CACHE TYPE STRING FORCE)
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG" CACHE STRING "Set release flags for Mingw" FORCE)
else()
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE TYPE STRING FORCE)
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "Set release flags" FORCE)
endif()
endif()
@ -945,7 +945,7 @@ if(MSVC)
if(LYX_WALL)
# Use the highest warning level
set(CMAKE_CXX_WARNING_LEVEL 4 CACHE TYPE STRING FORCE)
set(CMAKE_CXX_WARNING_LEVEL 4 CACHE STRING "Warning level" FORCE)
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
@ -969,7 +969,7 @@ if(MSVC)
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /Wp64 ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
else()
set(CMAKE_CXX_WARNING_LEVEL 3 CACHE TYPE STRING FORCE)
set(CMAKE_CXX_WARNING_LEVEL 3 CACHE STRING "Warning level" FORCE)
# add here warnings which should produce an error /weXXXX
set(MSVC_W_ERROR "/we4101 /we4189")

View File

@ -89,7 +89,7 @@ else()
check_function_exists(iconv HAVE_ICONV_IN_LIBC)
if(ICONV_INCLUDE_DIR AND HAVE_ICONV_IN_LIBC)
set(ICONV_FOUND TRUE)
set(ICONV_LIBRARY CACHE TYPE STRING FORCE)
set(ICONV_LIBRARY CACHE STRING "Iconv lib" FORCE)
endif()
if(ICONV_INCLUDE_DIR AND ICONV_LIBRARY)
set(ICONV_FOUND TRUE)

View File

@ -44,14 +44,14 @@ if(WINDEPS)
# don't stop in FindQt4.cmake because qmake will
# report wrong paths
set(QT_HEADERS_DIR "${WINDEPSDIR}/qt-4/include" CACHE TYPE STRING FORCE)
set(QT_LIBRARY_DIR "${WINDEPSDIR}/qt-4/lib" CACHE TYPE STRING FORCE)
set(QT_BINARY_DIR "${WINDEPSDIR}/qt-4/bin" CACHE TYPE STRING FORCE)
set(QT_MKSPECS_DIR "${WINDEPSDIR}/qt-4/mkspecs" CACHE TYPE STRING FORCE)
set(QT_PLUGINS_DIR "${WINDEPSDIR}/qt-4/plugins" CACHE TYPE STRING FORCE)
set(QT_MOC_EXECUTABLE "${WINDEPSDIR}/qt-4/bin/moc.exe" CACHE TYPE STRING FORCE)
set(QT_UIC_EXECUTABLE "${WINDEPSDIR}/qt-4/bin/uic.exe" CACHE TYPE STRING FORCE)
set(QT_RCC_EXECUTABLE "${WINDEPSDIR}/qt-4/bin/rcc.exe" CACHE TYPE STRING FORCE)
set(QT_HEADERS_DIR "${WINDEPSDIR}/qt-4/include" CACHE STRING "Qt4 headers directory" FORCE)
set(QT_LIBRARY_DIR "${WINDEPSDIR}/qt-4/lib" CACHE STRING "Qt4 libraries directory" FORCE)
set(QT_BINARY_DIR "${WINDEPSDIR}/qt-4/bin" CACHE STRING "Qt4 binaries directory" FORCE)
set(QT_MKSPECS_DIR "${WINDEPSDIR}/qt-4/mkspecs" CACHE STRING "Qt4 mkspecs directory" FORCE)
set(QT_PLUGINS_DIR "${WINDEPSDIR}/qt-4/plugins" CACHE STRING "Qt4 plugins directory" FORCE)
set(QT_MOC_EXECUTABLE "${WINDEPSDIR}/qt-4/bin/moc.exe" CACHE STRING "Qt4 moc executable" FORCE)
set(QT_UIC_EXECUTABLE "${WINDEPSDIR}/qt-4/bin/uic.exe" CACHE STRING "Qt4 uic executable" FORCE)
set(QT_RCC_EXECUTABLE "${WINDEPSDIR}/qt-4/bin/rcc.exe" CACHE STRING "Qt4 rcc executable" FORCE)
endif()
if(LYX_3RDPARTY_BUILD)