build: bump minimum GCC version to 9.1 and remove libfs compiler workaround

This commit is contained in:
Gabriel Ferreira
2024-02-13 21:34:09 +01:00
parent 7f830d7295
commit 2209a5abd1
3 changed files with 1 additions and 24 deletions

View File

@@ -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)

View File

@@ -14,22 +14,3 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
#
# Author: Gabriel Ferreira <gabrielcarvfer@gmail.com>
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 <filesystem>
int main()
{
std::string path = \"/\";
return !std::filesystem::exists(path);
}
"
FILESYSTEM_LIBRARY_IS_LINKED
)

View File

@@ -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})