From 2209a5abd18be77c6c865c837368b4e459ae7c8e Mon Sep 17 00:00:00 2001 From: Gabriel Ferreira Date: Tue, 13 Feb 2024 21:34:09 +0100 Subject: [PATCH] build: bump minimum GCC version to 9.1 and remove libfs compiler workaround --- CMakeLists.txt | 2 +- .../ns3-compiler-workarounds.cmake | 19 ------------------- .../custom-modules/ns3-module-macros.cmake | 4 ---- 3 files changed, 1 insertion(+), 24 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6137a0f5d..3802b9695 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ file(STRINGS VERSION NS3_VER) # minimum compiler versions set(AppleClang_MinVersion 11.0.0) set(Clang_MinVersion 10.0.0) -set(GNU_MinVersion 9.0.0) +set(GNU_MinVersion 9.1.0) # common options option(NS3_ASSERT "Enable assert on failure" OFF) diff --git a/build-support/custom-modules/ns3-compiler-workarounds.cmake b/build-support/custom-modules/ns3-compiler-workarounds.cmake index 32e37d85a..4386dafd5 100644 --- a/build-support/custom-modules/ns3-compiler-workarounds.cmake +++ b/build-support/custom-modules/ns3-compiler-workarounds.cmake @@ -14,22 +14,3 @@ # Place, Suite 330, Boston, MA 02111-1307 USA # # Author: Gabriel Ferreira - -include(CheckCXXSourceCompiles) - -# Some compilers (e.g. GCC < 9.1) do not link -# std::filesystem/std::experimental::filesystem by default. If the sample -# program can be linked, it means it is indeed linked by default. Otherwise, we -# link it manually. https://en.cppreference.com/w/cpp/filesystem -check_cxx_source_compiles( - " - #include - - int main() - { - std::string path = \"/\"; - return !std::filesystem::exists(path); - } - " - FILESYSTEM_LIBRARY_IS_LINKED -) diff --git a/build-support/custom-modules/ns3-module-macros.cmake b/build-support/custom-modules/ns3-module-macros.cmake index e0b3e41e5..a64790840 100644 --- a/build-support/custom-modules/ns3-module-macros.cmake +++ b/build-support/custom-modules/ns3-module-macros.cmake @@ -179,10 +179,6 @@ function(build_lib) ) endif() - if(NOT FILESYSTEM_LIBRARY_IS_LINKED) - list(APPEND BLIB_LIBRARIES_TO_LINK -lstdc++fs) - endif() - # Enable examples as tests suites if(${ENABLE_EXAMPLES} AND ${ENABLE_TESTS}) if(NOT ${XCODE})