Remove main.c, rename variable in CMakeLists.txt
This commit is contained in:
@@ -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()
|
||||||
@@ -135,9 +135,9 @@ target_link_libraries(BHLib PUBLIC m)
|
|||||||
|
|
||||||
# Enable all compiler warnings
|
# Enable all compiler warnings
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
target_compile_options(BHLib PRIVATE /W4 /WX)
|
target_compile_options(BHLib PRIVATE /W4 /WX)
|
||||||
else()
|
else()
|
||||||
target_compile_options(BHLib PRIVATE -Wall -Wextra -Wpedantic -Werror -fstrict-aliasing)
|
target_compile_options(BHLib PRIVATE -Wall -Wextra -Wpedantic -Werror -fstrict-aliasing)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Coverage
|
# Coverage
|
||||||
|
|||||||
Reference in New Issue
Block a user