From 5cb83a6bbbf4c093ed46c70af9fcd3ae523179f6 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 14 Oct 2020 17:20:57 +0200 Subject: [PATCH] Mac+Linux automatic selection --- src/make_ninja.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/make_ninja.py b/src/make_ninja.py index 1f1470c..2e5e514 100755 --- a/src/make_ninja.py +++ b/src/make_ninja.py @@ -66,11 +66,13 @@ FIX_ORDER_OF_LIBS=-Wl,--start-group """ -# TODO Change compiler here -# -------------------------- - -#compiler = compile_gfortran_mac -compiler = compile_gfortran_linux +if sys.platform in ["linux", "linux2"]: + compiler = compile_gfortran_linux +elif sys.platform == "darwin": + compiler = compile_gfortran_mac +else: + print("Unknown platform. Only Linux and Darwin are supported.") + sys.exit(-1) header = """# # This file was automatically generated. Do not modify this file.