Skip to content

Commit 39074b6

Browse files
committed
🎨 Fix cmake formatting
1 parent 40668b0 commit 39074b6

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

include/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
add_library(safe_arithmetic INTERFACE)
2-
target_include_directories(safe_arithmetic INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
2+
target_include_directories(safe_arithmetic
3+
INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
34
target_link_libraries(safe_arithmetic INTERFACE boost_mp11)

test/CMakeLists.txt

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
## Test that code is NOT able to compile
1+
# Test that code is NOT able to compile
22
function(test_static_assert_fail TEST_NAME)
33
add_executable(${TEST_NAME}_t EXCLUDE_FROM_ALL ${TEST_NAME}.cpp)
44
target_link_libraries(${TEST_NAME}_t PRIVATE safe_arithmetic)
55
add_test(NAME ${TEST_NAME}
6-
COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target ${TEST_NAME}_t
7-
)
8-
set_tests_properties(${TEST_NAME} PROPERTIES PASS_REGULAR_EXPRESSION "(static_assert)|(static assertion failed)")
6+
COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target
7+
${TEST_NAME}_t)
8+
set_tests_properties(
9+
${TEST_NAME} PROPERTIES PASS_REGULAR_EXPRESSION
10+
"(static_assert)|(static assertion failed)")
911
endfunction()
1012

11-
## Test that code that must compile
13+
# Test that code that must compile
1214
function(test_static_assert_pass TEST_NAME)
1315
add_executable(${TEST_NAME}_t EXCLUDE_FROM_ALL ${TEST_NAME}.cpp)
1416
target_link_libraries(${TEST_NAME}_t PRIVATE safe_arithmetic)
1517
add_test(NAME ${TEST_NAME}
16-
COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target ${TEST_NAME}_t
17-
)
18+
COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target
19+
${TEST_NAME}_t)
1820
endfunction()
1921

20-
add_subdirectory(safe)
22+
add_subdirectory(safe)

test/safe/var/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ test_static_assert_fail(construct_constant_min_violation)
55
test_static_assert_fail(interval_larger_than_type)
66
test_static_assert_fail(assign_lhs_rhs_union)
77
test_static_assert_fail(assign_lhs_union)
8-
test_static_assert_fail(assign_rhs_union)
8+
test_static_assert_fail(assign_rhs_union)

0 commit comments

Comments
 (0)