Skip to content

Commit 0b314fd

Browse files
authored
Treat all warnings as errors
1 parent 238c7a8 commit 0b314fd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ OPTION(XEUS_CPP_BUILD_EXECUTABLE "Build the xcpp executable" ON)
4747
OPTION(XEUS_CPP_USE_SHARED_XEUS "Link xcpp with the xeus shared library (instead of the static library)" ON)
4848
OPTION(XEUS_CPP_USE_SHARED_XEUS_CPP "Link xcpp with the xeus shared library (instead of the static library)" ON)
4949

50+
option(CMAKE_COMPILE_WARNING_AS_ERROR "Compile warnings as errors" ON)
51+
5052
# Test options
5153
OPTION(XEUS_CPP_BUILD_TESTS "xeus-cpp test suite" ON)
5254
OPTION(XEUS_CPP_ENABLE_CODE_COVERAGE "xeus-cpp test suite" OFF)

src/xinterpreter.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ int __get_cxx_version () {
101101
__get_cxx_version ()
102102
)";
103103

104-
long cxx_version = Cpp::Evaluate(code);
104+
auto cxx_version = Cpp::Evaluate(code);
105105
return std::to_string(cxx_version);
106106
}
107107

@@ -133,7 +133,6 @@ __get_cxx_version ()
133133
bool silent,
134134
bool /*store_history*/,
135135
nl::json /*user_expressions*/,
136-
bool allow_stdin
137136
)
138137
{
139138
nl::json kernel_res;

0 commit comments

Comments
 (0)