[Cmake-commits] CMake branch, next, updated. v3.6.1-1332-gef255b4
Brad King
brad.king at kitware.com
Tue Aug 23 10:41:56 EDT 2016
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via ef255b495f0258451eb53ba6f6525f58a4b5f60b (commit)
via 9bd0643a771b19131d14613e963d61d4b32106ee (commit)
from 683a63143a68a9ef50c659e86693a16ccc210c8d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ef255b495f0258451eb53ba6f6525f58a4b5f60b
commit ef255b495f0258451eb53ba6f6525f58a4b5f60b
Merge: 683a631 9bd0643
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Aug 23 10:41:54 2016 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Aug 23 10:41:54 2016 -0400
Merge topic 'test-extra-generator-dedup' into next
9bd0643a Tests: Refactor testing of extra generators.
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9bd0643a771b19131d14613e963d61d4b32106ee
commit 9bd0643a771b19131d14613e963d61d4b32106ee
Author: Chaoren Lin <chaorenl at google.com>
AuthorDate: Wed Aug 17 13:48:23 2016 -0700
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Aug 23 10:37:38 2016 -0400
Tests: Refactor testing of extra generators.
Use a loop instead of repeating the same thing multiple times.
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 6f1805b..c119cfd 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -569,60 +569,43 @@ if(BUILD_TESTING)
ADD_LINK_FLAGS_TEST(mod_flags_config dll_flags_config)
ADD_LINK_FLAGS_TEST(exe_flags_config mod_flags_config)
- # If we are running right now with a UnixMakefiles based generator,
+ # If we are running right now with a Unix Makefiles or Ninja based generator,
# build the "Simple" test with the ExtraGenerators, if available
# This doesn't test whether the generated project files work (unfortunately),
# mainly it tests that cmake doesn't crash when generating these project files.
- if(${CMAKE_GENERATOR} MATCHES "Unix Makefiles" OR ${CMAKE_GENERATOR} MATCHES "KDevelop")
+ if(${CMAKE_GENERATOR} MATCHES "Unix Makefiles" OR ${CMAKE_GENERATOR} MATCHES "Ninja")
+
# check which generators we have
execute_process(COMMAND ${CMAKE_CMAKE_COMMAND} --help
OUTPUT_VARIABLE cmakeOutput ERROR_VARIABLE cmakeOutput)
- # check for the Eclipse generator
- if ("${cmakeOutput}" MATCHES Eclipse)
- add_test(Simple_EclipseGenerator ${CMAKE_CTEST_COMMAND}
- --build-and-test
- "${CMake_SOURCE_DIR}/Tests/Simple"
- "${CMake_BINARY_DIR}/Tests/Simple_EclipseGenerator"
- --build-two-config
- --build-generator "Eclipse CDT4 - Unix Makefiles"
- --build-generator-platform "${CMAKE_GENERATOR_PLATFORM}"
- --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}"
- --build-project Simple
- --build-options ${build_options}
- --test-command Simple)
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Simple_EclipseGenerator")
- endif ()
- # check for the CodeBlocks generator
- if ("${cmakeOutput}" MATCHES CodeBlocks)
- add_test(Simple_CodeBlocksGenerator ${CMAKE_CTEST_COMMAND}
- --build-and-test
- "${CMake_SOURCE_DIR}/Tests/Simple"
- "${CMake_BINARY_DIR}/Tests/Simple_CodeBlocksGenerator"
- --build-two-config
- --build-generator "CodeBlocks - Unix Makefiles"
- --build-generator-platform "${CMAKE_GENERATOR_PLATFORM}"
- --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}"
- --build-project Simple
- --build-options ${build_options}
- --test-command Simple)
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Simple_CodeBlocksGenerator")
- endif ()
- # check for the KDevelop3 generator
- if ("${cmakeOutput}" MATCHES KDevelop3)
- add_test(Simple_KDevelop3Generator ${CMAKE_CTEST_COMMAND}
- --build-and-test
- "${CMake_SOURCE_DIR}/Tests/Simple"
- "${CMake_BINARY_DIR}/Tests/Simple_KDevelop3Generator"
- --build-two-config
- --build-generator "KDevelop3 - Unix Makefiles"
- --build-generator-platform "${CMAKE_GENERATOR_PLATFORM}"
- --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}"
- --build-project Simple
- --build-options ${build_options}
- --test-command Simple)
- list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Simple_KDevelop3Generator")
- endif ()
+ set(extraGenerators
+ "CodeBlocks"
+ "CodeLite"
+ "Eclipse CDT4"
+ "Kate"
+ "KDevelop3"
+ "Sublime Text 2")
+
+ foreach(extraGenerator ${extraGenerators})
+ if ("${cmakeOutput}" MATCHES "${extraGenerator} - ${CMAKE_GENERATOR}")
+ set(extraGeneratorTestName "Simple_${extraGenerator}Generator")
+ string(REPLACE " " "" extraGeneratorTestName ${extraGeneratorTestName})
+
+ add_test(${extraGeneratorTestName} ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/Simple"
+ "${CMake_BINARY_DIR}/Tests/${extraGeneratorTestName}"
+ --build-two-config
+ --build-generator "${extraGenerator} - ${CMAKE_GENERATOR}"
+ --build-generator-platform "${CMAKE_GENERATOR_PLATFORM}"
+ --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}"
+ --build-project Simple
+ --build-options ${build_options}
+ --test-command Simple)
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${extraGeneratorTestName}")
+ endif ()
+ endforeach(extraGenerator)
endif()
-----------------------------------------------------------------------
Summary of changes:
Tests/CMakeLists.txt | 77 ++++++++++++++++++++------------------------------
1 file changed, 30 insertions(+), 47 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list