mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 20:27:11 +01:00 
			
		
		
		
	Enable CMake project folders for better target organization
Closes #2917
This commit is contained in:
		| @@ -8,6 +8,8 @@ else() | ||||
|   set(NOT_SUBPROJECT OFF) | ||||
| endif() | ||||
|  | ||||
| set_property(GLOBAL PROPERTY USE_FOLDERS ON) | ||||
|  | ||||
| option(CATCH_INSTALL_DOCS "Install documentation alongside library" ON) | ||||
| option(CATCH_INSTALL_EXTRAS "Install extras (CMake scripts, debugger helpers) alongside library" ON) | ||||
| option(CATCH_DEVELOPMENT_BUILD "Build tests, enable warnings, enable Werror, etc" OFF) | ||||
| @@ -41,7 +43,6 @@ project(Catch2 | ||||
|   DESCRIPTION "A modern, C++-native, unit test framework." | ||||
| ) | ||||
|  | ||||
|  | ||||
| # Provide path for scripts. We first add path to the scripts we don't use, | ||||
| # but projects including us might, and set the path up to parent scope. | ||||
| # Then we also add path that we use to configure the project, but is of | ||||
| @@ -86,18 +87,22 @@ if (BUILD_TESTING AND CATCH_BUILD_TESTING AND NOT_SUBPROJECT) | ||||
|     if (NOT PYTHONINTERP_FOUND) | ||||
|         message(FATAL_ERROR "Python not found, but required for tests") | ||||
|     endif() | ||||
|     set(CMAKE_FOLDER "tests") | ||||
|     add_subdirectory(tests) | ||||
| endif() | ||||
|  | ||||
| if(CATCH_BUILD_EXAMPLES) | ||||
|     set(CMAKE_FOLDER "Examples") | ||||
|     add_subdirectory(examples) | ||||
| endif() | ||||
|  | ||||
| if(CATCH_BUILD_EXTRA_TESTS) | ||||
|     set(CMAKE_FOLDER "tests/ExtraTests") | ||||
|     add_subdirectory(tests/ExtraTests) | ||||
| endif() | ||||
|  | ||||
| if(CATCH_BUILD_FUZZERS) | ||||
|     set(CMAKE_FOLDER "fuzzing") | ||||
|     add_subdirectory(fuzzing) | ||||
| endif() | ||||
|  | ||||
|   | ||||
| @@ -8,7 +8,6 @@ project( Catch2ExtraTests LANGUAGES CXX ) | ||||
|  | ||||
| message( STATUS "Extra tests included" ) | ||||
|  | ||||
|  | ||||
| add_test( | ||||
|   NAME TestShardingIntegration | ||||
|   COMMAND ${PYTHON_EXECUTABLE} ${CATCH_DIR}/tests/TestScripts/testSharding.py $<TARGET_FILE:SelfTest> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský