diff --git a/CMakeLists.txt b/CMakeLists.txt index 9784633c4..641ab9ed4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,5 @@ cmake_minimum_required(VERSION 3.9) -include(CheckIPOSupported) include(CheckIncludeFiles) include(CheckFunctionExists) include(CheckPrototypeDefinition) @@ -126,13 +125,6 @@ with open(join('${CMAKE_SOURCE_DIR}','qadic', 'CPimport.txt')) as fin: ) configure_file(${CMAKE_BINARY_DIR}/CPimport.h.in ${CMAKE_BINARY_DIR}/CPimport.h COPYONLY) -# Setup for flint-config.h -check_c_compiler_flag("-mpopcnt" HAS_FLAG_MPOPCNT) -check_c_compiler_flag("-funroll-loops" HAS_FLAG_UNROLL_LOOPS) - -if(HAS_FLAG_MPOPCNT) - set(CMAKE_REQUIRED_FLAGS "-mpopcnt") -endif() # Testing __builtin_popcountl... check_c_source_runs([[int main(int argc, char ** argv) { #if defined(_WIN64) @@ -141,7 +133,6 @@ check_c_source_runs([[int main(int argc, char ** argv) { return __builtin_popcountl(argc) == 100; #endif }]] FLINT_USES_POPCNT) -unset(CMAKE_REQUIRED_FLAGS) # fenv configuration check_c_source_compiles([[#include @@ -250,13 +241,6 @@ if(BUILD_SHARED_LIBS AND WIN32) target_compile_definitions(flint PUBLIC "MSC_USE_DLL") endif() -if (HAS_FLAG_MPOPCNT) - target_compile_options(flint PUBLIC "-mpopcnt") -endif() -if (HAS_FLAG_UNROLL_LOOPS) - target_compile_options(flint PUBLIC "-funroll-loops") -endif() - # Versioning set_target_properties(flint PROPERTIES @@ -279,21 +263,6 @@ elseif (WIN32) set_target_properties(flint PROPERTIES RUNTIME_OUTPUT_NAME "flint-${FLINT_MAJOR}") endif() -if(NOT DEFINED IPO_SUPPORTED) - message(STATUS "Checking for IPO") - check_ipo_supported(RESULT ipo_supported LANGUAGES C) - if(ipo_supported) - message(STATUS "Checking for IPO - found") - else() - message(STATUS "Checking for IPO - not found") - endif() - set(IPO_SUPPORTED ${ipo_supported} CACHE INTERNAL "Introprocedural Optimization" FORCE) -endif() - -if(IPO_SUPPORTED) - set_target_properties(flint PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE) -endif() - if(NOT MSVC) target_link_libraries(flint PUBLIC m) endif()