Commit 26dc31e3 authored by Carsten Heinz's avatar Carsten Heinz

Fix examples for 32bit systems, disable LTO with old cmake

parent b9667622
......@@ -14,12 +14,6 @@ function(set_tapasco_defaults target_name)
target_compile_definitions(${target_name} PRIVATE -DLOG_USE_COLOR)
if(${CMAKE_VERSION} VERSION_LESS "3.9.0")
message("-- Using IPO through fallback! Use CMake version >= 3.9.0 if possible")
set_target_properties(${target_name} PROPERTIES CMAKE_AR "gcc-ar")
set_target_properties(${target_name} PROPERTIES CMAKE_RANLIB "gcc-ranlib")
target_compile_options(${target_name} PUBLIC $<$<CXX_COMPILER_ID:GNU>:-flto>
$<$<CXX_COMPILER_ID:GNU>:-fno-fat-lto-objects>
$<$<CXX_COMPILER_ID:GNU>:-Werror>)
else()
include(CheckIPOSupported)
check_ipo_supported(RESULT ipo_supported)
......@@ -29,4 +23,4 @@ function(set_tapasco_defaults target_name)
message(WARNING "IPO is not supported!")
endif()
endif()
endfunction(set_tapasco_defaults)
\ No newline at end of file
endfunction(set_tapasco_defaults)
......@@ -81,7 +81,7 @@ int main(int argc, char **argv)
check_tapasco(tapasco_init(&ctx));
check_tapasco(tapasco_create_device(ctx, 0, &dev, 0));
// check arrayinit instance count
printf("instance count: %ld\n", tapasco_device_kernel_pe_count(dev, 11));
printf("instance count: %zd\n", tapasco_device_kernel_pe_count(dev, 11));
assert(tapasco_device_kernel_pe_count(dev, 11));
// init whole array to subsequent numbers
......
......@@ -78,7 +78,7 @@ int main(int argc, char **argv)
check_tapasco(tapasco_init(&ctx));
check_tapasco(tapasco_create_device(ctx, 0, &dev, 0));
// check arraysum instance count
printf("instance count: %ld\n", tapasco_device_kernel_pe_count(dev, 10));
printf("instance count: %zd\n", tapasco_device_kernel_pe_count(dev, 10));
assert(tapasco_device_kernel_pe_count(dev, 10));
// init whole array to subsequent numbers
......
......@@ -87,7 +87,7 @@ int main(int argc, char **argv) {
check_tapasco(tapasco_init(&ctx));
check_tapasco(tapasco_create_device(ctx, 0, &dev, 0));
// check arrayupdate instance count
printf("instance count: %ld\n", tapasco_device_kernel_pe_count(dev, 9));
printf("instance count: %zd\n", tapasco_device_kernel_pe_count(dev, 9));
assert(tapasco_device_kernel_pe_count(dev, 9));
// init whole array to subsequent numbers
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment