소스 검색

link exampleServer statically, remove -Wcast-align, relates to #180

Stasik0 10 년 전
부모
커밋
0a57203719
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 2
      CMakeLists.txt
  2. 1 1
      ports/WAGO-750-860.patch

+ 2 - 2
CMakeLists.txt

@@ -18,7 +18,7 @@ endif()
 if(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
 add_definitions(-std=c99 -pipe -Wall -Wextra -Werror -Wformat
                 -Wno-unused-parameter -Wno-unused-function -Wno-unused-label -Wpointer-arith -Wreturn-type -Wsign-compare -Wmultichar
-                -Wshadow -Wcast-align -Wcast-qual -Wmissing-prototypes -Wstrict-prototypes # -Wconversion
+                -Wshadow -Wcast-qual -Wmissing-prototypes -Wstrict-prototypes # -Wconversion
                 -Winit-self -Wuninitialized -Wno-deprecated -Wformat-security -ffunction-sections -fdata-sections)
     if(NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
         add_definitions(-Wformat-nonliteral)
@@ -154,7 +154,7 @@ endif()
 option(EXAMPLESERVER "Build a test server" OFF)
 if(EXAMPLESERVER)
     add_executable(exampleServer examples/server.c examples/networklayer_tcp.c examples/logger_stdout.c ${exported_headers} ${generated_headers})
-    target_link_libraries(exampleServer open62541)
+    target_link_libraries(exampleServer open62541-static)
     if(WIN32)
         target_link_libraries(exampleServer ws2_32)
     else()

+ 1 - 1
ports/WAGO-750-860.patch

@@ -18,7 +18,7 @@ index c785182..9e66da0 100644
  if(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
 -add_definitions(-std=c99 -pipe -Wall -Wextra -Werror -Wformat
 -                -Wno-unused-parameter -Wno-unused-function -Wno-unused-label -Wpointer-arith -Wreturn-type -Wsign-compare -Wmultichar
--                -Wshadow -Wcast-align -Wcast-qual -Wmissing-prototypes -Wstrict-prototypes # -Wconversion
+-                -Wshadow -Wcast-qual -Wmissing-prototypes -Wstrict-prototypes # -Wconversion
 -                -Winit-self -Wuninitialized -Wno-deprecated -Wformat-security -ffunction-sections -fdata-sections)
 +add_definitions(-std=c99 -fomit-frame-pointer -pipe -msoft-float -fno-builtin -DEMBED -fno-strict-aliasing)
      if(NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")