mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-10-17 12:23:13 +08:00
Improving integer width detection
The C preprocessor cannot use sizeof in #if etc.
This commit is contained in:
@ -34,6 +34,12 @@ test: $(BUILD_DIR)/testunityRunner.c
|
||||
$(CC) $(CFLAGS) $(DEFINES) $(INC_DIR) $(SRC) -o $(TARGET)
|
||||
./$(TARGET)
|
||||
|
||||
# Compile only, for testing that preprocessor detection works
|
||||
UNITY_C_ONLY =-c ../src/unity.c -o $(BUILD_DIR)/unity.o
|
||||
intDetection:
|
||||
$(CC) $(CFLAGS) $(INC_DIR) $(UNITY_C_ONLY) -D UNITY_EXCLUDE_STDINT_H
|
||||
$(CC) $(CFLAGS) $(INC_DIR) $(UNITY_C_ONLY) -D UNITY_EXCLUDE_LIMITS_H
|
||||
|
||||
$(BUILD_DIR)/testunityRunner.c: tests/testunity.c | $(BUILD_DIR)
|
||||
awk $(AWK_SCRIPT) tests/testunity.c > $@
|
||||
|
||||
|
Reference in New Issue
Block a user