Skip to content

Commit

Permalink
Revert changes and update CMake policy
Browse files Browse the repository at this point in the history
  • Loading branch information
JNechaevsky committed Jan 4, 2025
1 parent 90a8e09 commit b3adac5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 5 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit b3adac5

Please sign in to comment.