Skip to content

Commit

Permalink
Fixes for lint errors in cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-downey committed Nov 4, 2024
1 parent 8937387 commit 1383086
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 13 deletions.
9 changes: 5 additions & 4 deletions etc/gcc-14-toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ include("${CMAKE_CURRENT_LIST_DIR}/gcc-flags.cmake")

set(CMAKE_C_COMPILER gcc-14)
set(CMAKE_CXX_COMPILER g++-14)
set(GCOV_EXECUTABLE
"gcov-14"
CACHE STRING "GCOV executable" FORCE)
set(GCOV_EXECUTABLE "gcov-14" CACHE STRING "GCOV executable" FORCE)

set(CMAKE_CXX_FLAGS_ASAN
"${CMAKE_CXX_FLAGS_ASAN} -Wno-maybe-uninitialized"
CACHE STRING "C++ ASAN Flags" FORCE)
CACHE STRING
"C++ ASAN Flags"
FORCE
)
5 changes: 4 additions & 1 deletion etc/gcc-15-toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ set(CMAKE_CXX_COMPILER g++-15)

set(CMAKE_CXX_FLAGS_ASAN
"${CMAKE_CXX_FLAGS_ASAN} -Wno-maybe-uninitialized"
CACHE STRING "C++ ASAN Flags" FORCE)
CACHE STRING
"C++ ASAN Flags"
FORCE
)
5 changes: 4 additions & 1 deletion etc/gcc-flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ set(CMAKE_CXX_FLAGS_TSAN
)
set(CMAKE_CXX_FLAGS_ASAN
"-O3 -g -DNDEBUG -fsanitize=address,undefined,leak"
CACHE STRING "C++ ASAN Flags" FORCE)
CACHE STRING
"C++ ASAN Flags"
FORCE
)

set(CMAKE_CXX_FLAGS_GCOV
"-O0 -fno-inline -g --coverage -fprofile-abs-path"
Expand Down
18 changes: 11 additions & 7 deletions src/beman/optional26/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ include(GoogleTest)
add_executable(beman_optional26_test)

target_sources(
beman_optional26_test
PRIVATE
beman_optional26_test
PRIVATE
optional.t.cpp
optional_constexpr.t.cpp
optional_monadic.t.cpp
Expand Down Expand Up @@ -38,12 +38,16 @@ add_library(constructor_fails test_constructor_fail.cpp)
target_link_libraries(constructor_fails PRIVATE beman_optional26)

set_target_properties(
constructor_fails PROPERTIES EXCLUDE_FROM_ALL true EXCLUDE_FROM_DEFAULT_BUILD
true)
constructor_fails
PROPERTIES EXCLUDE_FROM_ALL true EXCLUDE_FROM_DEFAULT_BUILD true
)

add_test(NAME constructor_fails
COMMAND ${CMAKE_COMMAND} --build "${CMAKE_BINARY_DIR}" --target
constructor_fails --config $<CONFIGURATION>)
add_test(
NAME constructor_fails
COMMAND
${CMAKE_COMMAND} --build "${CMAKE_BINARY_DIR}" --target
constructor_fails --config $<CONFIGURATION>
)

set_tests_properties(constructor_fails PROPERTIES WILL_FAIL true)
# Alternatively -- check for a particular regex to pass
Expand Down

0 comments on commit 1383086

Please sign in to comment.