summaryrefslogtreecommitdiffstats
path: root/Modules/IntelVSImplicitPath/detect.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-09-14 17:59:23 (GMT)
committerBrad King <brad.king@kitware.com>2011-09-14 18:06:02 (GMT)
commit67fcc838d9e857de2697c2fbe34e40ac095973dc (patch)
tree5ac12c3aa4e4315aafd40a198a47cc4aaa477158 /Modules/IntelVSImplicitPath/detect.cmake
parenta7ce26d837b1c6465c995519ee91e3e0d9190826 (diff)
downloadCMake-67fcc838d9e857de2697c2fbe34e40ac095973dc.zip
CMake-67fcc838d9e857de2697c2fbe34e40ac095973dc.tar.gz
CMake-67fcc838d9e857de2697c2fbe34e40ac095973dc.tar.bz2
Simplify IntelVSImplicitPath detection project
Use the ENV{LIB} variable directly instead of parsing the output of the whole environment from "set". Store the output in a .cmake script and include it from CMakeDetermineCompilerABI instead of using file(READ).
Diffstat (limited to 'Modules/IntelVSImplicitPath/detect.cmake')
-rw-r--r--Modules/IntelVSImplicitPath/detect.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/IntelVSImplicitPath/detect.cmake b/Modules/IntelVSImplicitPath/detect.cmake
new file mode 100644
index 0000000..20753be
--- /dev/null
+++ b/Modules/IntelVSImplicitPath/detect.cmake
@@ -0,0 +1,9 @@
+# look at each path and try to find ifconsol.lib
+set(LIB "$ENV{LIB}")
+foreach(dir ${LIB})
+ file(TO_CMAKE_PATH "${dir}" dir)
+ if(EXISTS "${dir}/ifconsol.lib")
+ file(WRITE output.cmake "list(APPEND implicit_dirs \"${dir}\")\n")
+ break()
+ endif()
+endforeach()