Skip to content

Commit e2b82ba

Browse files
authored
Treat all warnings as errors (non wasm) (#88)
1 parent b8c94f9 commit e2b82ba

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ jobs:
9999
-DCMAKE_PREFIX_PATH=$CONDA_PREFIX \
100100
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
101101
-DXEUS_CPP_ENABLE_CODE_COVERAGE=${{ matrix.coverage }} \
102+
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
102103
${{ matrix.extra_cmake_flags }}
103104
104105
- name: build & install

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# The full license is in the file LICENSE, distributed with this software. #
77
#############################################################################
88

9-
cmake_minimum_required(VERSION 3.4.3)
9+
cmake_minimum_required(VERSION 3.24)
1010
project(xeus-cpp)
1111

1212
enable_language(CXX)

src/xinterpreter.cpp

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

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

108108

@@ -138,6 +138,9 @@ __get_cxx_version ()
138138
{
139139
nl::json kernel_res;
140140

141+
142+
auto input_guard = input_redirection(allow_stdin);
143+
141144
// Check for magics
142145
for (auto& pre : preamble_manager.preamble)
143146
{

0 commit comments

Comments
 (0)