-
Notifications
You must be signed in to change notification settings - Fork 100
Open
Description
Hello. Can't manage to make it build since a mac os X update
makefile
cmake_minimum_required(VERSION 3.14)
set(BIN athena_core)
project(athena_core C)
enable_testing()
set(TEST_SOURCES tests/test_core.c)
add_executable(athena_core_test ${TEST_SOURCES})
add_test(NAME athena_core_test COMMAND athena_core_test)
target_link_libraries(athena_core_test athena_core)
set(SOURCES
casts.c
ath_ticker.c strings.c uint128.c threads.c arrays.c)
add_library(${BIN} ${SOURCES})
test file
#include <stdlib.h>
#define CTEST_MAIN 1
#include "../../../vendor/ctest/ctest.h"
#include "../include/core.h"
int main(int argc, const char **argv) {
return ctest_main(argc, argv);
}
CTEST(suite, test1) {
ath_uint128 val;
val.l = 0xAAAAAAAAAAAAAAAA;
val.r = 0x5555555555555555;
ath_core_uint128_shiftleft(&val, 0);
ASSERT_EQUAL(val.l , 0xAAAAAAAAAAAAAAAA);
}
Result of build
====================[ Build | all | Debug ]=====================================
/Applications/CLion.app/Contents/bin/cmake/mac/aarch64/bin/cmake --build /Volumes/fswork/www/athena/src/athena_core/cmake-build-debug --target all -j 6
[2/2] Linking C executable athena_core_test
FAILED: athena_core_test
: && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -g -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/athena_core_test.dir/tests/test_core.c.o -o athena_core_test libathena_core.a && :
ld: warning: alignment (1) of atom '_ctest_suite_test' from '/Volumes/fswork/www/athena/src/athena_core/cmake-build-debug/CMakeFiles/athena_core_test.dir/tests/test_core.c.o' is too small and may result in unaligned pointers
ld: warning: alignment (1) of atom '_ctest_suite_test1' from '/Volumes/fswork/www/athena/src/athena_core/cmake-build-debug/CMakeFiles/athena_core_test.dir/tests/test_core.c.o' is too small and may result in unaligned pointers
ld: building fixups: pointer not aligned at _ctest_suite_test+0x0 from /Volumes/fswork/www/athena/src/athena_core/cmake-build-debug/CMakeFiles/athena_core_test.dir/tests/test_core.c.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
Metadata
Metadata
Assignees
Labels
No labels