From 93033ebc99442038ab137710bbd4014a249e75c8 Mon Sep 17 00:00:00 2001 From: Mikhail Romanko Date: Fri, 28 Feb 2025 10:28:17 +0300 Subject: Remove main.c, rename variable in CMakeLists.txt --- CMakeLists.txt | 12 ++++++------ main.c | 11 ----------- 2 files changed, 6 insertions(+), 17 deletions(-) delete mode 100644 main.c diff --git a/CMakeLists.txt b/CMakeLists.txt index f6fc67c..840b4c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,14 +46,14 @@ include(CheckIPOSupported) include(CheckIncludeFile) include(CheckSymbolExists) -# Check for IPO/LTO -check_ipo_supported(RESULT supported) - # Unit testing and coverage configuration set(TESTING ON CACHE BOOL "Enable unit-testing") 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") set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) endif() @@ -135,9 +135,9 @@ target_link_libraries(BHLib PUBLIC m) # Enable all compiler warnings if(MSVC) - target_compile_options(BHLib PRIVATE /W4 /WX) + target_compile_options(BHLib PRIVATE /W4 /WX) else() - target_compile_options(BHLib PRIVATE -Wall -Wextra -Wpedantic -Werror -fstrict-aliasing) + target_compile_options(BHLib PRIVATE -Wall -Wextra -Wpedantic -Werror -fstrict-aliasing) endif() # Coverage diff --git a/main.c b/main.c deleted file mode 100644 index 70d6f86..0000000 --- a/main.c +++ /dev/null @@ -1,11 +0,0 @@ -#include - -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; -} \ No newline at end of file -- cgit v1.2.3