stellar

Stellar - UCI Chess engine written in C++20
git clone git://git.dimitrijedobrota.com/stellar.git
Log | Files | Refs | README | LICENSE

CMakeLists.txt (978B)


      1 cmake_minimum_required(VERSION 3.25.2)
      2 set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
      3 
      4 project(
      5     Stellar
      6 	VERSION 1.4.3
      7     DESCRIPTION "Chess engine written in C++"
      8 	HOMEPAGE_URL https://git.dimitrijedobrota.com/stellar.git
      9     LANGUAGES CXX
     10 )
     11 enable_testing()
     12 
     13 set(CMAKE_CXX_STANDARD 20)
     14 set(CMAKE_CXX_STANDARD_REQUIRED ON)
     15 set(CMAKE_CXX_EXTENSIONS OFF)
     16 
     17 set(CMAKE_CXX_FLAGS_PROFILE "-pg" CACHE STRING
     18     "Enable profileing for the project"
     19     FORCE
     20 )
     21 
     22 mark_as_advanced(CMAKE_CXX_FLAGS_PROFILE)
     23 set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING
     24     "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel Profile"
     25     FORCE
     26 )
     27 
     28 add_subdirectory(src)
     29 
     30 include(CheckIPOSupported)
     31 check_ipo_supported(RESULT lto_supported OUTPUT lto_error)
     32 
     33 if( lto_supported )
     34     message(STATUS "IPO / LTO enabled")
     35     set_property(TARGET engine PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
     36 else()
     37     message(STATUS "IPO / LTO not supported: <${error}>")
     38 endif()