File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -5,19 +5,20 @@ set(CMAKE_CXX_STANDARD 20)
55
66include_directories (${CMAKE_CURRENT_SOURCE_DIR} /src)
77
8- function (target_set_warnings target )
8+ function (target_set_options target )
99 target_compile_options (${target} PRIVATE $<$<CXX_COMPILER_ID:MSVC >:/W4> $<$<NOT :$<CXX_COMPILER_ID:MSVC >>:-Wall -Wextra -pedantic>)
1010endfunction ()
1111
1212file (GLOB_RECURSE NWTREES_CORE_SRC src/nwtrees/*.cpp src/nwtrees/*.hpp)
1313add_library (nwtrees_core ${NWTREES_CORE_SRC} )
14- target_set_warnings (nwtrees_core)
14+ target_set_options (nwtrees_core)
1515
1616file (GLOB_RECURSE NWTREES_COMPILER_SRC src/compiler/*.cpp src/compiler/*.hpp)
1717add_executable (nwtrees ${NWTREES_COMPILER_SRC} )
1818target_link_libraries (nwtrees nwtrees_core)
19- target_set_warnings (nwtrees)
19+ target_set_options (nwtrees)
2020
2121file (GLOB_RECURSE NWTREES_TESTS_SRC tests/*.cpp tests/*.hpp)
2222add_executable (nwtrees_tests ${NWTREES_TESTS_SRC} )
2323target_link_libraries (nwtrees_tests nwtrees_core)
24+ target_set_options(nwtrees_tests)
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ TEST_CLASS(Lexer)
158158 TEST_EXPECT (token.type == nwtrees::Token::Literal);
159159 TEST_EXPECT (token.literal == nwtrees::Literal::Float);
160160
161- const float as_flt = std::atof (literals[i]);
161+ const float as_flt = ( float ) std::atof (literals[i]);
162162 TEST_EXPECT (token.literal_data .flt == as_flt);
163163 }
164164 }
You can’t perform that action at this time.
0 commit comments