<commit_before>#
# file: CMakeLists.txt
#
# author: Copyright (C) 2017 <NAME> http://www.distortec.com http://www.freddiechopin.info
#
# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
# distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

add_executable(C-API-Semaphore-compile-link-test
		C-API-Semaphore-compile-link-test.c
		${DISTORTOS_PATH}/source/C-API/C-API-Semaphore.cpp
		${MAIN_CPP})
		
target_compile_definitions(C-API-Semaphore-compile-link-test PUBLIC DISTORTOS_UNIT_TEST)
target_include_directories(C-API-Semaphore-compile-link-test BEFORE PUBLIC
		${INCLUDE_MOCKS}/distortosConfiguration.h
		${INCLUDE_MOCKS}/fromCApi.hpp-Semaphore
		${INCLUDE_MOCKS}/Semaphore.hpp)

add_executable(C-API-Semaphore-unit-test-0
		C-API-Semaphore-unit-test-0.cpp
		${DISTORTOS_PATH}/source/C-API/C-API-Semaphore.cpp
		${MAIN_CPP})

target_compile_definitions(C-API-Semaphore-unit-test-0 PUBLIC DISTORTOS_UNIT_TEST)
target_include_directories(C-API-Semaphore-unit-test-0 BEFORE PUBLIC
		${INCLUDE_MOCKS}/distortosConfiguration.h
		${INCLUDE_MOCKS}/fromCApi.hpp-Semaphore
		${INCLUDE_MOCKS}/Semaphore.hpp)

add_custom_target(run-C-API-Semaphore-unit-test-0
	COMMAND C-API-Semaphore-unit-test-0
	COMMENT C-API-Semaphore-unit-test-0
	USES_TERMINAL)
add_dependencies(run run-C-API-Semaphore-unit-test-0)

add_executable(C-API-Semaphore-unit-test-1
		C-API-Semaphore-unit-test-1.cpp
		${DISTORTOS_PATH}/source/C-API/C-API-Semaphore.cpp
		${DISTORTOS_PATH}/source/synchronization/Semaphore.cpp
		${MAIN_CPP})

target_include_directories(C-API-Semaphore-unit-test-1 BEFORE PUBLIC
		${INCLUDE_MOCKS}/architecture/enableInterruptMasking.hpp
		${INCLUDE_MOCKS}/architecture/InterruptMask.hpp
		${INCLUDE_MOCKS}/architecture/restoreInterruptMasking.hpp
		${INCLUDE_MOCKS}/internal/scheduler/getScheduler.hpp
		${INCLUDE_MOCKS}/internal/scheduler/Scheduler.hpp
		${INCLUDE_MOCKS}/distortosConfiguration.h
		${INCLUDE_MOCKS}/TickClock.hpp)
target_compile_options(C-API-Semaphore-unit-test-1 PUBLIC -include ${INCLUDE_MOCKS}/reent.h)

add_custom_target(run-C-API-Semaphore-unit-test-1
	COMMAND C-API-Semaphore-unit-test-1
	COMMENT C-API-Semaphore-unit-test-1
	USES_TERMINAL)
add_dependencies(run run-C-API-Semaphore-unit-test-1)<commit_msg>Use mock of ThreadControlBlock instead of force-including reent.h<commit_after>#
# file: CMakeLists.txt
#
# author: Copyright (C) 2017 <NAME> http://www.distortec.com http://www.freddiechopin.info
#
# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
# distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

add_executable(C-API-Semaphore-compile-link-test
		C-API-Semaphore-compile-link-test.c
		${DISTORTOS_PATH}/source/C-API/C-API-Semaphore.cpp
		${MAIN_CPP})
		
target_compile_definitions(C-API-Semaphore-compile-link-test PUBLIC DISTORTOS_UNIT_TEST)
target_include_directories(C-API-Semaphore-compile-link-test BEFORE PUBLIC
		${INCLUDE_MOCKS}/distortosConfiguration.h
		${INCLUDE_MOCKS}/fromCApi.hpp-Semaphore
		${INCLUDE_MOCKS}/Semaphore.hpp)

add_executable(C-API-Semaphore-unit-test-0
		C-API-Semaphore-unit-test-0.cpp
		${DISTORTOS_PATH}/source/C-API/C-API-Semaphore.cpp
		${MAIN_CPP})

target_compile_definitions(C-API-Semaphore-unit-test-0 PUBLIC DISTORTOS_UNIT_TEST)
target_include_directories(C-API-Semaphore-unit-test-0 BEFORE PUBLIC
		${INCLUDE_MOCKS}/distortosConfiguration.h
		${INCLUDE_MOCKS}/fromCApi.hpp-Semaphore
		${INCLUDE_MOCKS}/Semaphore.hpp)

add_custom_target(run-C-API-Semaphore-unit-test-0
	COMMAND C-API-Semaphore-unit-test-0
	COMMENT C-API-Semaphore-unit-test-0
	USES_TERMINAL)
add_dependencies(run run-C-API-Semaphore-unit-test-0)

add_executable(C-API-Semaphore-unit-test-1
		C-API-Semaphore-unit-test-1.cpp
		${DISTORTOS_PATH}/source/C-API/C-API-Semaphore.cpp
		${DISTORTOS_PATH}/source/synchronization/Semaphore.cpp
		${MAIN_CPP})

target_include_directories(C-API-Semaphore-unit-test-1 BEFORE PUBLIC
		${INCLUDE_MOCKS}/architecture/enableInterruptMasking.hpp
		${INCLUDE_MOCKS}/architecture/InterruptMask.hpp
		${INCLUDE_MOCKS}/architecture/restoreInterruptMasking.hpp
		${INCLUDE_MOCKS}/internal/scheduler/getScheduler.hpp
		${INCLUDE_MOCKS}/internal/scheduler/Scheduler.hpp
		${INCLUDE_MOCKS}/internal/scheduler/ThreadControlBlock.hpp
		${INCLUDE_MOCKS}/internal/scheduler/ThreadListNode.hpp
		${INCLUDE_MOCKS}/distortosConfiguration.h
		${INCLUDE_MOCKS}/TickClock.hpp)

add_custom_target(run-C-API-Semaphore-unit-test-1
	COMMAND C-API-Semaphore-unit-test-1
	COMMENT C-API-Semaphore-unit-test-1
	USES_TERMINAL)
add_dependencies(run run-C-API-Semaphore-unit-test-1)
{'fraction_non_alphanumeric': 0.12842284016132455, 'fraction_numerical': 0.00997665039269794, 'mean_word_length': 5.384823848238482, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '820649', 'n_tokens_mistral': 1984, 'n_tokens_neox': 1812, 'n_words': 214}