diff options
author | Brad King <brad.king@kitware.com> | 2011-09-14 17:59:23 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2011-09-14 18:06:02 (GMT) |
commit | 67fcc838d9e857de2697c2fbe34e40ac095973dc (patch) | |
tree | 5ac12c3aa4e4315aafd40a198a47cc4aaa477158 /Modules/IntelVSImplicitPath/detect.cmake | |
parent | a7ce26d837b1c6465c995519ee91e3e0d9190826 (diff) | |
download | CMake-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.cmake | 9 |
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() |