Commit a6fff164 authored by Millian Poquet's avatar Millian Poquet
Browse files

bs: only link libstdc++fs on old compilers

parent 8eaecf68
......@@ -42,6 +42,7 @@ let
pythonPackages = pkgs.python3Packages;
buildPythonPackage = pythonPackages.buildPythonPackage;
#custom-stdenv-base = if useClang then pkgs.llvmPackages_11.stdenv else pkgs.gcc11Stdenv;
custom-stdenv-base = if useClang then pkgs.clangStdenv else pkgs.gccStdenv;
custom-stdenv = if debug then (pkgs.stdenvAdapters.keepDebugInfo custom-stdenv-base) else custom-stdenv-base;
......
......@@ -17,7 +17,6 @@ endif
message('batsim version set to: ' + batversion)
# Dependencies
add_project_link_arguments(['-lstdc++fs'], language : 'cpp')
simgrid_dep = dependency('simgrid')
boost_dep = dependency('boost')
rapidjson_dep = dependency('RapidJSON')
......@@ -27,6 +26,15 @@ docopt_dep = dependency('docopt')
pugixml_dep = dependency('pugixml')
intervalset_dep = dependency('intervalset')
# old gcc/llvm c++ std libraries have implemented the filesystem lib in a separate lib
# - https://releases.llvm.org/11.0.1/projects/libcxx/docs/UsingLibcxx.html#using-filesystem
# - https://gcc.gnu.org/gcc-9/changes.html
if meson.get_compiler('cpp').get_id() == 'clang' and meson.get_compiler('cpp').version().version_compare('<9.0')
add_project_link_arguments(['-lstdc++fs'], language : 'cpp')
elif meson.get_compiler('cpp').get_id() == 'gcc' and meson.get_compiler('cpp').version().version_compare('<9.0')
add_project_link_arguments(['-lstdc++fs'], language : 'cpp')
endif
batsim_deps = [
simgrid_dep,
boost_dep,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment