build: bump minimum GCC version to 9.1 and remove libfs compiler workaround
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user