cmake: specify source file extensions

This commit is contained in:
Ben Boeckel 2018-01-09 08:01:23 -05:00
parent f7f34a46e6
commit efd279cdfb
3 changed files with 27 additions and 25 deletions

View File

@ -2,19 +2,19 @@
# file Copyright.txt or https://cmake.org/licensing for details.
set( CURSES_SRCS
CursesDialog/cmCursesOptionsWidget
CursesDialog/cmCursesBoolWidget
CursesDialog/cmCursesCacheEntryComposite
CursesDialog/cmCursesDummyWidget
CursesDialog/cmCursesFilePathWidget
CursesDialog/cmCursesForm
CursesDialog/cmCursesLabelWidget
CursesDialog/cmCursesLongMessageForm
CursesDialog/cmCursesMainForm
CursesDialog/cmCursesPathWidget
CursesDialog/cmCursesStringWidget
CursesDialog/cmCursesWidget
CursesDialog/ccmake
CursesDialog/cmCursesOptionsWidget.cxx
CursesDialog/cmCursesBoolWidget.cxx
CursesDialog/cmCursesCacheEntryComposite.cxx
CursesDialog/cmCursesDummyWidget.cxx
CursesDialog/cmCursesFilePathWidget.cxx
CursesDialog/cmCursesForm.cxx
CursesDialog/cmCursesLabelWidget.cxx
CursesDialog/cmCursesLongMessageForm.cxx
CursesDialog/cmCursesMainForm.cxx
CursesDialog/cmCursesPathWidget.cxx
CursesDialog/cmCursesStringWidget.cxx
CursesDialog/cmCursesWidget.cxx
CursesDialog/ccmake.cxx
)
include_directories(${CURSES_INCLUDE_PATH})

View File

@ -5,21 +5,21 @@ include_directories(
)
set(CMakeLib_TESTS
testGeneratedFileStream
testRST
testSystemTools
testUTF8
testXMLParser
testXMLSafe
testFindPackageCommand
testUVRAII
testGeneratedFileStream.cxx
testRST.cxx
testSystemTools.cxx
testUTF8.cxx
testXMLParser.cxx
testXMLSafe.cxx
testFindPackageCommand.cxx
testUVRAII.cxx
)
set(testRST_ARGS ${CMAKE_CURRENT_SOURCE_DIR})
if(WIN32)
list(APPEND CMakeLib_TESTS
testVisualStudioSlnParser
testVisualStudioSlnParser.cxx
)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/testVisualStudioSlnParser.h.in
${CMAKE_CURRENT_BINARY_DIR}/testVisualStudioSlnParser.h @ONLY)
@ -38,7 +38,8 @@ set_property(TARGET CMakeLibTests PROPERTY CXX_CLANG_TIDY "")
add_executable(testEncoding testEncoding.cxx)
target_link_libraries(testEncoding cmsys)
foreach(test ${CMakeLib_TESTS})
foreach(testfile ${CMakeLib_TESTS})
get_filename_component(test "${testfile}" NAME_WE)
add_test(CMakeLib.${test} CMakeLibTests ${test} ${${test}_ARGS})
endforeach()

View File

@ -5,7 +5,7 @@ include_directories(
)
set(CMakeServerLib_TESTS
testServerBuffering
testServerBuffering.cpp
)
create_test_sourcelist(CMakeLib_TEST_SRCS CMakeServerLibTests.cxx ${CMakeServerLib_TESTS})
@ -15,6 +15,7 @@ target_link_libraries(CMakeServerLibTests CMakeLib CMakeServerLib)
SET_PROPERTY(TARGET CMakeServerLibTests PROPERTY C_CLANG_TIDY "")
SET_PROPERTY(TARGET CMakeServerLibTests PROPERTY CXX_CLANG_TIDY "")
foreach(test ${CMakeServerLib_TESTS})
foreach(testfile ${CMakeServerLib_TESTS})
get_filename_component(test "${testfile}" NAME_WE)
add_test(CMakeServerLib.${test} CMakeServerLibTests ${test} ${${test}_ARGS})
endforeach()