Skip to content

Commit

Permalink
Added warnings at compile
Browse files Browse the repository at this point in the history
  • Loading branch information
Teskann committed May 30, 2022
1 parent 760f6c1 commit 7020c46
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion cmake/build_example.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
include(cmake/build_lib.cmake)

add_executable(blns_example examples/example.cpp)
target_link_libraries(blns_example PRIVATE lib_blns)
target_link_libraries(blns_example PRIVATE lib_blns)
target_compile_options(blns_example PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:/W4 /WX>
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wall -Wextra -Wpedantic -Werror>)
5 changes: 4 additions & 1 deletion cmake/build_lib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ add_library(lib_blns STATIC src/blns/blns.cpp)
target_include_directories(lib_blns
PUBLIC
${PROJECT_SOURCE_DIR}/include
)
)
target_compile_options(lib_blns PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:/W4 /WX>
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wall -Wextra -Wpedantic -Werror>)
1 change: 1 addition & 0 deletions examples/example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ int main() {
{
std::cout << ns << std::endl;
}
return 0;
}

0 comments on commit 7020c46

Please sign in to comment.