Skip to content

Commit e6c276e

Browse files
authored
Merge pull request #827 from redboltz/fix_825_minimal
Fixed #825.
2 parents 9c45623 + befc3cd commit e6c276e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+217
-44
lines changed

.github/workflows/gha.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,6 @@ jobs:
315315
echo $env:BOOST_ROOT
316316
$env:DBOOST_ROOT="$env:Boost_ROOT"
317317
Start-Process cmake -ArgumentList "-DBOOST_ROOT=""$env:BOOST_ROOT"" $CPP11 $BOOST $X3_PARSE -DGTEST_LIBRARY=""$CUR\googletest-release-1.7.0\build\Release\gtest.lib"" -DGTEST_MAIN_LIBRARY=""$CUR\googletest-release-1.7.0\build\Release\gtest_main.lib"" -DGTEST_INCLUDE_DIR=""$CUR\googletest-release-1.7.0\include"" -DZLIB_LIBRARY=""$CUR\zlib-1.2.11\build\Release\zlib.lib"" -DZLIB_INCLUDE_DIR=""$CUR\zlib-1.2.11"" -DCMAKE_CXX_FLAGS=""/D_VARIADIC_MAX=10 /EHsc /D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING"" .." -NoNewWindow -Wait
318-
cmake --build . --config Release
318+
cmake --build . --config Release -v
319319
$env:PATH="$env:PATH;$CUR\googletest-release-1.7.0\build\Release;$CUR\zlib-1.2.11\build\Release;$CUR\build\release"
320320
ctest -V

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,14 @@ IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
313313
ENDIF ()
314314
ENDIF ()
315315

316+
IF ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
317+
IF (CMAKE_C_FLAGS MATCHES "/W[0-4]")
318+
STRING(REGEX REPLACE "/W[0-4]" "/W3 /WX" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
319+
ELSE ()
320+
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3 /WX")
321+
ENDIF ()
322+
ENDIF ()
323+
316324
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC90" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC10")
317325
SET_SOURCE_FILES_PROPERTIES(${msgpackc_SOURCES} PROPERTIES LANGUAGE CXX)
318326
ENDIF ()

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ build_script:
5555
- md build
5656
- cd build
5757
- cmake -G %msvc% %cpp11% %boost% %x3_parse% -DGTEST_LIBRARY=%APPVEYOR_BUILD_FOLDER%\googletest-release-1.7.0\build\Release\gtest.lib -DGTEST_MAIN_LIBRARY=%APPVEYOR_BUILD_FOLDER%\googletest-release-1.7.0\build\Release\gtest_main.lib -DGTEST_INCLUDE_DIR=%APPVEYOR_BUILD_FOLDER%\googletest-release-1.7.0\include -DZLIB_LIBRARY=%APPVEYOR_BUILD_FOLDER%\zlib-1.2.11\build\Release\zlib.lib -DZLIB_INCLUDE_DIR=%APPVEYOR_BUILD_FOLDER%\zlib-1.2.11 -DCMAKE_CXX_FLAGS='"/D_VARIADIC_MAX=10 /EHsc"' ..
58-
- cmake --build . --config Release
58+
- cmake --build . --config Release -v
5959

6060
test_script:
6161
- set PATH=%PATH%;%APPVEYOR_BUILD_FOLDER%\googletest-release-1.7.0\build\Release;%APPVEYOR_BUILD_FOLDER%\zlib-1.2.11\build\Release;%APPVEYOR_BUILD_FOLDER%\build\release

example/c/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ FOREACH (source_file ${exec_PROGRAMS})
1515
TARGET_LINK_LIBRARIES (${source_file_we}
1616
msgpackc
1717
)
18-
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
18+
IF ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
1919
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wall -Wextra")
2020
ENDIF ()
2121

22-
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
22+
IF ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
2323
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-mismatched-tags")
2424
ENDIF ()
2525

26-
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
27-
IF (CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
28-
STRING(REGEX REPLACE "/W[0-4]" "/W3 /WX" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
26+
IF ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
27+
IF (CMAKE_C_FLAGS MATCHES "/W[0-4]")
28+
STRING(REGEX REPLACE "/W[0-4]" "/W3 /WX" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
2929
ELSE ()
30-
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3 /WX")
30+
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3 /WX")
3131
ENDIF ()
3232
ENDIF ()
3333
ENDFOREACH ()

test/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ FOREACH (source_file ${check_PROGRAMS})
9696
ENDIF ()
9797

9898
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
99-
IF (CMAKE_CXX_FLAGS MATCHES "/W[0-4] /WX")
99+
IF (CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
100100
STRING(REGEX REPLACE "/W[0-4]" "/W3 /WX" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
101101
ELSE ()
102-
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
102+
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3 /WX")
103103
ENDIF ()
104104
ENDIF ()
105105
ENDFOREACH ()

test/array_ref.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@
33
#include <string>
44
#include <sstream>
55

6+
#if defined(__GNUC__)
67
#pragma GCC diagnostic push
78
#pragma GCC diagnostic ignored "-Wconversion"
9+
#endif //defined(__GNUC__)
810

911
#include <gtest/gtest.h>
1012

13+
#if defined(__GNUC__)
1114
#pragma GCC diagnostic pop
15+
#endif //defined(__GNUC__)
1216

1317
#ifdef HAVE_CONFIG_H
1418
#include "config.h"

test/boost_fusion.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@
33
#include <iterator>
44
#include <cmath>
55

6+
#if defined(__GNUC__)
67
#pragma GCC diagnostic push
78
#pragma GCC diagnostic ignored "-Wconversion"
9+
#endif //defined(__GNUC__)
810

911
#include <gtest/gtest.h>
1012

13+
#if defined(__GNUC__)
1114
#pragma GCC diagnostic pop
15+
#endif //defined(__GNUC__)
1216

1317
#ifdef HAVE_CONFIG_H
1418
#include "config.h"

test/boost_optional.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22
#include <sstream>
33
#include <iterator>
44

5+
#if defined(__GNUC__)
56
#pragma GCC diagnostic push
67
#pragma GCC diagnostic ignored "-Wconversion"
8+
#endif //defined(__GNUC__)
79

810
#include <gtest/gtest.h>
911

12+
#if defined(__GNUC__)
1013
#pragma GCC diagnostic pop
14+
#endif //defined(__GNUC__)
1115

1216

1317
#ifdef HAVE_CONFIG_H

test/boost_string_ref.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22
#include <sstream>
33
#include <iterator>
44

5+
#if defined(__GNUC__)
56
#pragma GCC diagnostic push
67
#pragma GCC diagnostic ignored "-Wconversion"
8+
#endif //defined(__GNUC__)
79

810
#include <gtest/gtest.h>
911

12+
#if defined(__GNUC__)
1013
#pragma GCC diagnostic pop
11-
14+
#endif //defined(__GNUC__)
1215

1316
#ifdef HAVE_CONFIG_H
1417
#include "config.h"

test/boost_string_view.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22
#include <sstream>
33
#include <iterator>
44

5+
#if defined(__GNUC__)
56
#pragma GCC diagnostic push
67
#pragma GCC diagnostic ignored "-Wconversion"
8+
#endif //defined(__GNUC__)
79

810
#include <gtest/gtest.h>
911

12+
#if defined(__GNUC__)
1013
#pragma GCC diagnostic pop
14+
#endif //defined(__GNUC__)
1115

1216
#ifdef HAVE_CONFIG_H
1317
#include "config.h"

0 commit comments

Comments
 (0)