sw:vec_iree: Make IREE source path configurable

Can point IREE source code to the custom op repository via
-DIREE_SOURCE_DIR during cmake configuration.

Change-Id: I8f74a64c093d76f34f916c9e7db1f1d83a4331ca
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5128e42..cb26763 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,6 +14,8 @@
 
 set(BUILD_RV64_LINUX OFF CACHE BOOL "Build RISC-V 64-bit Linux target (default: OFF)")
 set(BUILD_INTERNAL_MODELS OFF CACHE BOOL "Build applications from internal models (default: OFF)")
+set(IREE_SOURCE_DIR "$ENV{ROOTDIR}/toolchain/iree" CACHE PATH
+    "IREE source code path. (default: $ENV{ROOTDIR}/toolchain/iree)")
 
 # Use nano spec header and libraries.
 if(NOT ${BUILD_RV64_LINUX})
@@ -75,12 +77,13 @@
   include_directories(native_log)
 endif()
 
+message(STATUS "Include IREE source at ${IREE_SOURCE_DIR}")
 # Build IREE runtime libraries.
-add_subdirectory($ENV{ROOTDIR}/toolchain/iree iree)
+add_subdirectory(${IREE_SOURCE_DIR} iree)
 
 # Apply IREE's CMake variables and build options so we can use IREE build
 # functions properly in this project.
-include($ENV{ROOTDIR}/toolchain/iree/build_tools/cmake/iree_copts.cmake)
+include(${IREE_SOURCE_DIR}/build_tools/cmake/iree_copts.cmake)
 
 include(springbok_bytecode_module)
 include(iree_model_input)