diff --git a/build/env.cmake b/build/env.cmake
index 9527451..7ab041b 100644
--- a/build/env.cmake
+++ b/build/env.cmake
@@ -106,12 +106,16 @@ else ()
 endif ()
 
 # create variables based entirely upon OS
-if ( "mac" STREQUAL ${OS} )
-    add_compile_definitions( MAC BSD UNIX )
+if ( CMAKE_C_COMPILER_ID STREQUAL "AppleClang" )
     set(CMAKE_C_ARCHIVE_CREATE   "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
-    set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
     set(CMAKE_C_ARCHIVE_FINISH   "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
+endif()
+if ( CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" )
+    set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
     set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
+endif()
+if ( "mac" STREQUAL ${OS} )
+    add_compile_definitions( MAC BSD UNIX )
 elseif( "linux" STREQUAL ${OS} )
     add_compile_definitions( LINUX UNIX )
     set( LMCHECK -lmcheck )
