mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 00:32:37 +01:00 
			
		
		
		
	Reformat CMake files
This commit is contained in:
		
							
								
								
									
										6
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							| @@ -10,5 +10,9 @@ | ||||
|   }, | ||||
|   "C_Cpp.default.includePath": [ | ||||
|     "/src" | ||||
|   ] | ||||
|   ], | ||||
|   "[cmake]": { | ||||
|     "editor.detectIndentation": false, | ||||
|     "editor.insertSpaces": false, | ||||
|   } | ||||
| } | ||||
|   | ||||
| @@ -27,11 +27,10 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)") | ||||
| 	if(${COVERAGE}) | ||||
| 		set(CMAKE_CXX_FLAGS "-fprofile-arcs -ftest-coverage") | ||||
| 	endif() | ||||
|  | ||||
| endif() | ||||
|  | ||||
| if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | ||||
| 	if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.8) AND (NOT ${COVERAGE})) | ||||
| 	if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.8) AND(NOT ${COVERAGE})) | ||||
| 		add_compile_options(-g -Og) | ||||
| 	else() | ||||
| 		add_compile_options(-g -O0) | ||||
| @@ -65,7 +64,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||||
| endif() | ||||
|  | ||||
| if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") | ||||
| 	if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.0) AND (NOT ${COVERAGE})) | ||||
| 	if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.0) AND(NOT ${COVERAGE})) | ||||
| 		add_compile_options(-g -Og) | ||||
| 	else() | ||||
| 		add_compile_options(-g -O0) | ||||
| @@ -73,7 +72,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") | ||||
| endif() | ||||
|  | ||||
| if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") | ||||
| 	if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.0) AND (NOT ${COVERAGE})) | ||||
| 	if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.0) AND(NOT ${COVERAGE})) | ||||
| 		add_compile_options(-g -Og) | ||||
| 	else() | ||||
| 		add_compile_options(-g -O0) | ||||
|   | ||||
| @@ -2,5 +2,7 @@ | ||||
| # Copyright © 2014-2022, Benoit BLANCHON | ||||
| # MIT License | ||||
|  | ||||
| idf_component_register(SRCS "main.cpp" | ||||
|                        INCLUDE_DIRS "") | ||||
| idf_component_register( | ||||
| 	SRCS "main.cpp" | ||||
| 	INCLUDE_DIRS "" | ||||
| ) | ||||
|   | ||||
| @@ -34,17 +34,13 @@ macro(add_fuzzer name) | ||||
| 	) | ||||
| 	set_target_properties("${FUZZER}" | ||||
| 		PROPERTIES | ||||
| 			COMPILE_FLAGS   | ||||
| 				"-fprofile-instr-generate -fcoverage-mapping -fsanitize=fuzzer -fno-sanitize-recover=all" | ||||
| 			LINK_FLAGS | ||||
| 				"-fprofile-instr-generate -fcoverage-mapping -fsanitize=fuzzer -fno-sanitize-recover=all" | ||||
| 			COMPILE_FLAGS "-fprofile-instr-generate -fcoverage-mapping -fsanitize=fuzzer -fno-sanitize-recover=all" | ||||
| 			LINK_FLAGS "-fprofile-instr-generate -fcoverage-mapping -fsanitize=fuzzer -fno-sanitize-recover=all" | ||||
| 	) | ||||
|  | ||||
| 	add_test( | ||||
| 		NAME | ||||
| 			"${FUZZER}" | ||||
| 		COMMAND | ||||
| 			"${FUZZER}" "${CORPUS_DIR}" "${SEED_CORPUS_DIR}" -max_total_time=5 -timeout=1 | ||||
| 		NAME "${FUZZER}" | ||||
| 		COMMAND "${FUZZER}" "${CORPUS_DIR}" "${SEED_CORPUS_DIR}" -max_total_time=5 -timeout=1 | ||||
| 	) | ||||
|  | ||||
| 	set_tests_properties("${FUZZER}" | ||||
| @@ -53,7 +49,7 @@ macro(add_fuzzer name) | ||||
| 	) | ||||
| endmacro() | ||||
|  | ||||
| if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6) | ||||
| if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6) | ||||
| 	add_fuzzer(json) | ||||
| 	add_fuzzer(msgpack) | ||||
| endif() | ||||
|   | ||||
| @@ -9,12 +9,9 @@ macro(build_should_fail target) | ||||
| 			EXCLUDE_FROM_DEFAULT_BUILD TRUE | ||||
| 	) | ||||
| 	add_test( | ||||
| 		NAME | ||||
| 			${target} | ||||
| 	    COMMAND | ||||
| 	    	${CMAKE_COMMAND} --build . --target ${target} --config $<CONFIGURATION> | ||||
| 	    WORKING_DIRECTORY | ||||
| 	    	${CMAKE_BINARY_DIR} | ||||
| 		NAME ${target} | ||||
| 			COMMAND ${CMAKE_COMMAND} --build . --target ${target} --config $<CONFIGURATION> | ||||
| 			WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | ||||
| 	) | ||||
| 	set_tests_properties(${target} | ||||
| 		PROPERTIES | ||||
| @@ -23,7 +20,6 @@ macro(build_should_fail target) | ||||
| 	) | ||||
| endmacro() | ||||
|  | ||||
|  | ||||
| add_executable(Issue978 Issue978.cpp) | ||||
| build_should_fail(Issue978) | ||||
|  | ||||
|   | ||||
| @@ -10,7 +10,6 @@ add_executable(NumbersTests | ||||
| 	parseNumber.cpp | ||||
| ) | ||||
|  | ||||
|  | ||||
| add_test(Numbers NumbersTests) | ||||
|  | ||||
| set_tests_properties(Numbers | ||||
|   | ||||
| @@ -55,7 +55,8 @@ configure_package_config_file( | ||||
| 		"${PROJECT_SOURCE_DIR}/extras/ArduinoJsonConfig.cmake.in" | ||||
| 		"${PROJECT_BINARY_DIR}/ArduinoJsonConfig.cmake" | ||||
| 	INSTALL_DESTINATION | ||||
|         ${CMAKE_INSTALL_DATAROOTDIR}/ArduinoJson/cmake) | ||||
| 		${CMAKE_INSTALL_DATAROOTDIR}/ArduinoJson/cmake | ||||
| ) | ||||
|  | ||||
| install( | ||||
| 	EXPORT | ||||
|   | ||||
		Reference in New Issue
	
	Block a user