]> git.mdlowis.com Git - proto/sclpl.git/commitdiff
Fixed the rakefile to always use clang
authorMichael D. Lowis <mike@mdlowis.com>
Wed, 24 Sep 2014 15:08:49 +0000 (11:08 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Wed, 24 Sep 2014 15:08:49 +0000 (11:08 -0400)
Rakefile

index e9cf8a08afc846d95282ea5b67f52e30ec46bc64..f5a3320bf0ef422bf0adf5518ea9d6312832dfc5 100644 (file)
--- a/Rakefile
+++ b/Rakefile
@@ -10,7 +10,7 @@ end
 # Define the compiler environment
 BaseEnv = BuildEnv.new(echo: :command) do |env|
   env.build_dir('source','build/obj/source')
-  env.set_toolset(:gcc)
+  env.set_toolset(:clang)
   env["CFLAGS"] += ['--std=c99', '-Wall', '-Wextra']#, '-Werror']
 end
 
@@ -38,9 +38,10 @@ file "#{CLANG_BIN_DIR}/#{CLANG_BIN_NAME}" => ["#{CLANG_BUILD_DIR}/Makefile"] + F
     end
 end
 
-task :clang => ["#{CLANG_BIN_DIR}/#{CLANG_BIN_NAME}"] do
-    ENV['PATH'] = "#{CLANG_BIN_DIR}#{windows? ? ';':':'}#{ENV['PATH']}"
-end
+task :clang => ["#{CLANG_BIN_DIR}/#{CLANG_BIN_NAME}"]
+
+# Register clang with the environment
+ENV['PATH'] = "#{CLANG_BIN_DIR}#{windows? ? ';':':'}#{ENV['PATH']}"
 
 #------------------------------------------------------------------------------
 # Rscons Build Targets