mirror of
https://github.com/likle/cwalk.git
synced 2026-10-28 09:44:01 +00:00
converted line endings to unix
This commit is contained in:
1 parent
2434a7a719
commit
cfe8282fce
35 files changed
+6398
-6398
No files matched your search
+15
-15
@@ -1,15 +1,15 @@
|
||||
function(create_test_list list_name target)
|
||||
set("TEST_LIST_TARGET_${list_name}" ${target} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(write_test_file list_name file)
|
||||
set("TEST_LIST_FILE_${list_name}" ${file} PARENT_SCOPE)
|
||||
file(WRITE ${file} "#define UNIT_TESTS(XX) \\\n")
|
||||
file(APPEND ${file} ${TEST_LIST_CONTENT_${list_name}})
|
||||
file(APPEND ${file} "\n")
|
||||
endfunction()
|
||||
|
||||
function(create_test list_name unit_name test_name)
|
||||
set(TEST_LIST_CONTENT_${list_name} "${TEST_LIST_CONTENT_${list_name}} XX(${unit_name},${test_name}) \\\n" PARENT_SCOPE)
|
||||
add_test(NAME "${unit_name}_${test_name}" COMMAND ${TEST_LIST_TARGET_${list_name}} ${unit_name} ${test_name})
|
||||
endfunction()
|
||||
function(create_test_list list_name target)
|
||||
set("TEST_LIST_TARGET_${list_name}" ${target} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(write_test_file list_name file)
|
||||
set("TEST_LIST_FILE_${list_name}" ${file} PARENT_SCOPE)
|
||||
file(WRITE ${file} "#define UNIT_TESTS(XX) \\\n")
|
||||
file(APPEND ${file} ${TEST_LIST_CONTENT_${list_name}})
|
||||
file(APPEND ${file} "\n")
|
||||
endfunction()
|
||||
|
||||
function(create_test list_name unit_name test_name)
|
||||
set(TEST_LIST_CONTENT_${list_name} "${TEST_LIST_CONTENT_${list_name}} XX(${unit_name},${test_name}) \\\n" PARENT_SCOPE)
|
||||
add_test(NAME "${unit_name}_${test_name}" COMMAND ${TEST_LIST_TARGET_${list_name}} ${unit_name} ${test_name})
|
||||
endfunction()
|
||||
@@ -1 +1 @@
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/CwalkTargets.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/CwalkTargets.cmake")
|
||||
+25
-25
@@ -1,25 +1,25 @@
|
||||
# enable warnings
|
||||
function(enable_warnings target)
|
||||
if(MSVC)
|
||||
target_compile_definitions(${target} PRIVATE _CRT_SECURE_NO_WARNINGS)
|
||||
target_compile_options(${target} PRIVATE /W4)
|
||||
if (NOT IGNORE_WARNINGS)
|
||||
target_compile_options(${target} PRIVATE /WX)
|
||||
endif()
|
||||
elseif("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
|
||||
target_compile_options(${target} PRIVATE -Wall)
|
||||
target_compile_options(${target} PRIVATE -Wextra)
|
||||
target_compile_options(${target} PRIVATE -Wpedantic)
|
||||
target_compile_options(${target} PRIVATE -Wno-gnu-zero-variadic-macro-arguments)
|
||||
if (NOT IGNORE_WARNINGS)
|
||||
target_compile_options(${target} PRIVATE -Werror)
|
||||
endif()
|
||||
elseif("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
|
||||
target_compile_options(${target} PRIVATE -Wall)
|
||||
target_compile_options(${target} PRIVATE -Wextra)
|
||||
target_compile_options(${target} PRIVATE -Wpedantic)
|
||||
if (NOT IGNORE_WARNINGS)
|
||||
target_compile_options(${target} PRIVATE -Werror)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
# enable warnings
|
||||
function(enable_warnings target)
|
||||
if(MSVC)
|
||||
target_compile_definitions(${target} PRIVATE _CRT_SECURE_NO_WARNINGS)
|
||||
target_compile_options(${target} PRIVATE /W4)
|
||||
if (NOT IGNORE_WARNINGS)
|
||||
target_compile_options(${target} PRIVATE /WX)
|
||||
endif()
|
||||
elseif("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
|
||||
target_compile_options(${target} PRIVATE -Wall)
|
||||
target_compile_options(${target} PRIVATE -Wextra)
|
||||
target_compile_options(${target} PRIVATE -Wpedantic)
|
||||
target_compile_options(${target} PRIVATE -Wno-gnu-zero-variadic-macro-arguments)
|
||||
if (NOT IGNORE_WARNINGS)
|
||||
target_compile_options(${target} PRIVATE -Werror)
|
||||
endif()
|
||||
elseif("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
|
||||
target_compile_options(${target} PRIVATE -Wall)
|
||||
target_compile_options(${target} PRIVATE -Wextra)
|
||||
target_compile_options(${target} PRIVATE -Wpedantic)
|
||||
if (NOT IGNORE_WARNINGS)
|
||||
target_compile_options(${target} PRIVATE -Werror)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
Reference in new issue
Block a user