mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Cmake build: Fix some warnings with cmake3.13
Wrong set() syntax
This commit is contained in:
parent
5e4fd6c796
commit
5e287500bf
@ -555,7 +555,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()
|
||||
@ -605,12 +605,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()
|
||||
|
||||
@ -926,7 +926,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}")
|
||||
@ -950,7 +950,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")
|
||||
|
@ -82,7 +82,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)
|
||||
|
Loading…
Reference in New Issue
Block a user