update all cmake files to version 3.9

other misc cmake fixes

version 3.9 allows for ipo (lto)
This commit is contained in:
2022-05-03 18:53:24 +02:00
parent 052bdb45ec
commit 6b06d5cb99
38 changed files with 96 additions and 45 deletions

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
# cmake setup begin
project(MushMachine C CXX)
@ -19,6 +19,11 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
# add this to your projects cmake to enable ipo
#include(CheckIPOSupported)
#check_ipo_supported()
#set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
# enable test
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
include(CTest)