diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2711e719..f022f5bd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -47,9 +47,7 @@ jobs: run: | cmake -B build_vs_64 -S . -DCMAKE_BUILD_TYPE=Release ` -DENABLE_LTO=ON ` - -DVCPKG_OVERLAY_TRIPLETS="cmake/triplets" ` -DVCPKG_TARGET_TRIPLET="x64-windows-static-release" ` - -DCMAKE_POLICY_DEFAULT_CMP0091=NEW ` -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ` -DCMAKE_C_FLAGS_RELEASE="/MT /O2 /Ob2 /DNDEBUG /GL /Oy /arch:AVX2" ` -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 56d2aa72..af97693f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,8 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") cmake_minimum_required(VERSION 3.10) +cmake_policy(SET CMP0069 NEW) +cmake_policy(SET CMP0091 NEW) project("Inter" VERSION 8.1.0 LANGUAGES C) set(CMAKE_C_STANDARD 99) @@ -54,10 +56,6 @@ endif() # Enable LTO if available. Hovewer, CMake does not appear to support # LTO properly for MinGW GCC which results in much longer linking time. # Consider only enabling it when making a release. -if(POLICY CMP0069) - cmake_policy(SET CMP0069 NEW) -endif() - include(CheckIPOSupported) check_ipo_supported(RESULT HAVE_LTO) @@ -124,15 +122,9 @@ find_package(m) include(CheckSymbolExists) include(CheckIncludeFile) -if(WIN32) - check_symbol_exists(_stricmp "string.h" HAVE_DECL_STRNCASECMP) - check_symbol_exists(_strnicmp "string.h" HAVE_DECL_STRNCASECMP) - check_include_file("windows.h" HAVE_DIRENT_H) -else() - check_symbol_exists(strcasecmp "strings.h" HAVE_DECL_STRCASECMP) - check_symbol_exists(strncasecmp "strings.h" HAVE_DECL_STRNCASECMP) - check_include_file("dirent.h" HAVE_DIRENT_H) -endif() +check_symbol_exists(strcasecmp "strings.h" HAVE_DECL_STRCASECMP) +check_symbol_exists(strncasecmp "strings.h" HAVE_DECL_STRNCASECMP) +check_include_file("dirent.h" HAVE_DIRENT_H) string(CONCAT WINDOWS_RC_VERSION "${PROJECT_VERSION_MAJOR}, " "${PROJECT_VERSION_MINOR}, ${PROJECT_VERSION_PATCH}, 0")