fix for Linux

This commit is contained in:
Evan Burkey 2023-12-28 12:31:14 -08:00
parent 637aa01364
commit 474232271c
2 changed files with 8 additions and 2 deletions

View File

@ -15,10 +15,14 @@ set(SOURCES
src/string.c
src/vector.c
src/utility.c
src/macos.c
)
add_library(flint ${SOURCES})
if ((${CMAKE_SYSTEM_NAME} STREQUAL "Darwin"))
add_library(flint ${SOURCES} src/macos.c)
else()
add_library(flint ${SOURCES})
endif()
if ((${CMAKE_SYSTEM_NAME} STREQUAL "Linux"))
target_link_libraries(flint bsd)
endif()

View File

@ -304,6 +304,7 @@ void test_string() {
printf("Passes all string tests\n");
}
#if defined(__APPLE__) || defined(__MACH__)
void test_macos() {
printf("\n--- macOS TEST ---\n");
@ -316,6 +317,7 @@ void test_macos() {
}
free(pd);
}
#endif
int main() {
test_ll();