diff options
author | Brad King <brad.king@kitware.com> | 2018-01-11 15:19:18 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-01-11 15:19:25 (GMT) |
commit | 2d5fdc25df8c8b9f10282b8cbc07cf86f2e0c9b8 (patch) | |
tree | c40b5d2e1535d116968f78d6f14d290f89caf613 /Tests | |
parent | 30fcb925762280b3a904f8f2598449927414ebd6 (diff) | |
parent | efd279cdfb64f1ca9ab2dd55c55e836634431198 (diff) | |
download | CMake-2d5fdc25df8c8b9f10282b8cbc07cf86f2e0c9b8.zip CMake-2d5fdc25df8c8b9f10282b8cbc07cf86f2e0c9b8.tar.gz CMake-2d5fdc25df8c8b9f10282b8cbc07cf86f2e0c9b8.tar.bz2 |
Merge topic 'specify-source-extensions'
efd279cd cmake: specify source file extensions
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1645
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeLib/CMakeLists.txt | 21 | ||||
-rw-r--r-- | Tests/CMakeServerLib/CMakeLists.txt | 5 |
2 files changed, 14 insertions, 12 deletions
diff --git a/Tests/CMakeLib/CMakeLists.txt b/Tests/CMakeLib/CMakeLists.txt index 9f09185..06df53f 100644 --- a/Tests/CMakeLib/CMakeLists.txt +++ b/Tests/CMakeLib/CMakeLists.txt @@ -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() diff --git a/Tests/CMakeServerLib/CMakeLists.txt b/Tests/CMakeServerLib/CMakeLists.txt index 5e1ad0c..2c23c2d 100644 --- a/Tests/CMakeServerLib/CMakeLists.txt +++ b/Tests/CMakeServerLib/CMakeLists.txt @@ -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() |