Remove main.c, rename variable in CMakeLists.txt

This commit is contained in:
2025-02-28 10:28:17 +03:00
parent e1c62d4f6b
commit 93033ebc99
2 changed files with 6 additions and 17 deletions

View File

@@ -46,14 +46,14 @@ include(CheckIPOSupported)
include(CheckIncludeFile) include(CheckIncludeFile)
include(CheckSymbolExists) include(CheckSymbolExists)
# Check for IPO/LTO
check_ipo_supported(RESULT supported)
# Unit testing and coverage configuration # Unit testing and coverage configuration
set(TESTING ON CACHE BOOL "Enable unit-testing") set(TESTING ON CACHE BOOL "Enable unit-testing")
set(COVERAGE OFF CACHE BOOL "Enable coverage") set(COVERAGE OFF CACHE BOOL "Enable coverage")
if(supported) # Check for IPO/LTO
check_ipo_supported(RESULT LTO_SUPPORTED)
if(LTO_SUPPORTED)
message(STATUS "IPO/LTO enabled") message(STATUS "IPO/LTO enabled")
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
endif() endif()

11
main.c
View File

@@ -1,11 +0,0 @@
#include <bh/io.h>
int main()
{
BH_IO *io = BH_FileNew("hello.txt");
BH_IOOpen(io, BH_IO_WRITE);
BH_IOWrite(io, "Hello, world!", 13, NULL);
BH_IOFree(io);
return 0;
}