Skip to content
Snippets Groups Projects
Commit 50f2616e authored by Tobias Leibner's avatar Tobias Leibner
Browse files

[cmake] fix adding tests to format

parent 4e75f606
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,9 @@ macro(add_format)
find_program(FORMAT NAMES clang-format clang-format-3.4 clang-format-3.5 clang-format-3.6 clang-format-3.7 clang-format-3.8 clang-format-3.9)
if(EXISTS ${FORMAT})
message(STATUS "adding format target")
add_custom_target( format SOURCES ${ARGN} )
if (NOT TARGET format)
add_custom_target( format SOURCES ${ARGN} )
endif (NOT TARGET format)
foreach(_file ${ARGN})
string(REPLACE "/" "_" fn ${_file})
if(NOT EXISTS ${_file})
......
......@@ -27,7 +27,7 @@ dune_library_add_sources(dunextcommon SOURCES ${lib_dune_xt_common_sources})
add_analyze(${lib_dune_xt_common_sources})
FILE( GLOB_RECURSE _header "${CMAKE_CURRENT_SOURCE_DIR}/*.hh" )
add_format(${lib_dune_xt_common_sources} ${test_sources} ${_header})
add_format(${lib_dune_xt_common_sources} ${_header})
install(DIRECTORY ${DUNE_XT_COMMON_TEST_DIR}/gtest
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dune/xt/test/
FILES_MATCHING PATTERN "*")
......
......@@ -14,5 +14,7 @@ DEPENDENCYCHECK( ${xtcommon} )
set_source_files_properties( ${DUNE_HEADERS} PROPERTIES HEADER_FILE_ONLY 1 )
BEGIN_TESTCASES(dunextcommon)
END_TESTCASES()
\ No newline at end of file
add_format(${test_sources})
END_TESTCASES()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment