Remove file(GLOB ...) usage from CMakeLists.txt (#4427)

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2021-01-12 10:47:36 +01:00
committed by GitHub
parent 5cef002ed6
commit 4399744588
9 changed files with 507 additions and 36 deletions
+59 -1
View File
@@ -24,7 +24,65 @@ if(${FEATURE_PROFILE} STREQUAL "${CMAKE_SOURCE_DIR}/jerry-core/profiles/minimal.
endif()
# Unit tests main modules
file(GLOB SOURCE_UNIT_TEST_MAIN_MODULES *.c)
set(SOURCE_UNIT_TEST_MAIN_MODULES
test-has-property.c
test-api-objecttype.c
test-strings.c
test-exec-stop.c
test-api-functiontype.c
test-external-string.c
test-from-property-descriptor.c
test-dataview.c
test-api-errortype.c
test-arraybuffer.c
test-api-object-property-names.c
test-to-integer.c
test-regression-3588.c
test-number-converter.c
test-api-value-type.c
test-jmem.c
test-promise.c
test-realm.c
test-internal-properties.c
test-abort.c
test-api-promise.c
test-context-data.c
test-backtrace.c
test-objects-foreach.c
test-api-binary-operations-arithmetics.c
test-api-binary-operations-comparisons.c
test-to-length.c
test-api-strings.c
test-proxy.c
test-container.c
test-api-binary-operations-instanceof.c
test-snapshot.c
test-native-callback-nested.c
test-lit-char-helpers.c
test-resource-name.c
test-unicode.c
test-bigint.c
test-api-property.c
test-api-iteratortype.c
test-api.c
test-typedarray.c
test-api-set-and-clear-error-flag.c
test-json.c
test-native-instanceof.c
test-literal-storage.c
test-mem-stats.c
test-newtarget.c
test-number-to-int32.c
test-number-to-string.c
test-string-to-number.c
test-poolman.c
test-regexp-dotall-unicode.c
test-date-helpers.c
test-regexp.c
test-stringbuilder.c
test-symbol.c
test-to-property-descriptor.c
)
# jerry_heap_stats_t.size == 0 if system allocator is used.
if(JERRY_SYSTEM_ALLOCATOR)
+19 -1
View File
@@ -17,7 +17,25 @@ project (unit-doc C)
find_package(PythonInterp REQUIRED)
set(GEN_DOCTEST "${CMAKE_SOURCE_DIR}/tools/gen-doctest.py")
file(GLOB DOC_FILES "${CMAKE_SOURCE_DIR}/docs/*.md")
set(DOC_FILES
"${CMAKE_SOURCE_DIR}/docs/00.GETTING-STARTED.md"
"${CMAKE_SOURCE_DIR}/docs/01.CONFIGURATION.md"
"${CMAKE_SOURCE_DIR}/docs/02.API-REFERENCE.md"
"${CMAKE_SOURCE_DIR}/docs/03.API-EXAMPLE.md"
"${CMAKE_SOURCE_DIR}/docs/04.INTERNALS.md"
"${CMAKE_SOURCE_DIR}/docs/05.PORT-API.md"
"${CMAKE_SOURCE_DIR}/docs/06.REFERENCE-COUNTING.md"
"${CMAKE_SOURCE_DIR}/docs/07.DEBUGGER.md"
"${CMAKE_SOURCE_DIR}/docs/08.CODING-STANDARDS.md"
"${CMAKE_SOURCE_DIR}/docs/09.EXT-REFERENCE-ARG.md"
"${CMAKE_SOURCE_DIR}/docs/10.EXT-REFERENCE-HANDLER.md"
"${CMAKE_SOURCE_DIR}/docs/11.EXT-REFERENCE-AUTORELEASE.md"
"${CMAKE_SOURCE_DIR}/docs/12.EXT-REFERENCE-MODULE.md"
"${CMAKE_SOURCE_DIR}/docs/13.DEBUGGER-TRANSPORT.md"
"${CMAKE_SOURCE_DIR}/docs/14.EXT-REFERENCE-HANDLE-SCOPE.md"
"${CMAKE_SOURCE_DIR}/docs/15.MODULE-SYSTEM.md"
"${CMAKE_SOURCE_DIR}/docs/16.MIGRATION-GUIDE.md"
)
if(NOT (${CMAKE_C_COMPILER_ID} STREQUAL MSVC))
set(COMPILE_FLAGS_DOCTEST "-Wno-unused-parameter -Wno-unused-function -Wno-unused-variable")
+20 -6
View File
@@ -18,7 +18,20 @@ project (unit-ext C)
set(INCLUDE_UNIT_EXT ${CMAKE_CURRENT_SOURCE_DIR})
# Unit tests main modules
file(GLOB SOURCE_UNIT_TEST_EXT_MODULES *.c)
set(SOURCE_UNIT_TEST_EXT_MODULES
test-ext-arg.c
test-ext-handle-scope-handle-prelist.c
test-ext-module-empty.c
test-ext-autorelease.c
test-ext-handle-scope-nested.c
test-ext-handle-scope.c
test-ext-handle-scope-escape.c
test-ext-method-register.c
test-ext-handle-scope-handle-prelist-escape.c
test-ext-handle-scope-remove.c
test-ext-handle-scope-root.c
test-ext-module-canonical.c
)
# Disable test-ext-autorelease.c if compiler is MSVC, because MSVC doesn't support cleanup attribute.
if(USING_MSVC)
@@ -41,9 +54,10 @@ foreach(SOURCE_UNIT_TEST_EXT ${SOURCE_UNIT_TEST_EXT_MODULES})
add_dependencies(unittests-ext ${TARGET_NAME})
endforeach()
file(GLOB CONTENTS_UNIT_TEST_EXT *)
foreach(CONTENT_UNIT_TEST_EXT ${CONTENTS_UNIT_TEST_EXT})
if(IS_DIRECTORY ${CONTENT_UNIT_TEST_EXT})
add_subdirectory(${CONTENT_UNIT_TEST_EXT})
endif()
set(UNIT_TEST_EXT_DIRS
module
)
foreach(UNIT_TEST_EXT_DIR ${UNIT_TEST_EXT_DIRS})
add_subdirectory(${UNIT_TEST_EXT_DIR})
endforeach()
+5 -1
View File
@@ -16,7 +16,11 @@ cmake_minimum_required (VERSION 2.8.12)
set(JERRYX_MODULE_UNITTEST_NAME unit-test-jerry-module)
project (${JERRYX_MODULE_UNITTEST_NAME} C)
file(GLOB JERRYX_MODULE_UNIT_TEST_SOURCES *.c)
set(JERRYX_MODULE_UNIT_TEST_SOURCES
jerry-module-test.c
my-broken-module.c
my-custom-module.c
)
if (FEATURE_INIT_FINI)
set(DEFINES_JERRYX_MODULE_UNITTEST ${DEFINES_JERRYX_MODULE_UNITTEST} ENABLE_INIT_FINI)
+3 -1
View File
@@ -16,7 +16,9 @@ cmake_minimum_required (VERSION 2.8.12)
project (unit-math C)
# Unit tests main modules
file(GLOB SOURCE_UNIT_TEST_MAIN_MODULES *.c)
set(SOURCE_UNIT_TEST_MAIN_MODULES
test-math.c
)
# Unit tests declaration
add_custom_target(unittests-math)