Skip to content

Commit b1a313a

Browse files
committed
cmake: Ignore well-known warnings
The warnings are erroneously raised because of a partial implementation of C99.
1 parent a5cf706 commit b1a313a

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

CMakeLists.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ if (CMAKE_COMPILER_IS_GNUCC)
3737

3838
# gcc >= 4.6
3939
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-prototypes")
40+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-missing-field-initializers")
4041
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Winline")
4142
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion")
4243
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wswitch-enum")
@@ -85,15 +86,22 @@ pkg_check_modules(GLIB2 REQUIRED glib-2.0 gthread-2.0 gmodule-2.0)
8586

8687
add_custom_target(
8788
libdill_s
88-
ALL
89-
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/vendor/sustrik/libdill
90-
COMMAND lndir ${CMAKE_SOURCE_DIR}/vendor/sustrik/libdill
9189
COMMAND ./autogen.sh
9290
COMMAND ./configure --enable-static --disable-shared
9391
COMMAND make
9492
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/vendor/sustrik/libdill
9593
COMMENT "Building libdill")
9694

95+
if (NOT (${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_SOURCE_DIR}))
96+
add_custom_target(
97+
libdill_source
98+
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/vendor/sustrik/libdill
99+
COMMAND lndir ${CMAKE_SOURCE_DIR}/vendor/sustrik/libdill
100+
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/vendor/sustrik/libdill
101+
COMMENT "Preparing the source of libdill")
102+
add_dependencies(libdill_s libdill_source)
103+
endif()
104+
97105
set(CMAKE_LIBRARY_PATH "")
98106
set(CMAKE_INCLUDE_PATH "")
99107
include_directories(AFTER

0 commit comments

Comments
 (0)