Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
0d4cd043
Commit
0d4cd043
authored
Sep 03, 2004
by
Bill Hoffman
Browse files
ENH better test for free VC tools
parent
9d19df26
Changes
2
Hide whitespace changes
Inline
Side-by-side
Modules/CMakeTestForFreeVC.cxx
0 → 100644
View file @
0d4cd043
#include
<iostream>
int
main
(){
return
0
;}
Modules/Platform/Windows-cl.cmake
View file @
0d4cd043
...
...
@@ -73,29 +73,22 @@ IF(CMAKE_GENERATOR MATCHES "NMake Makefiles")
SET
(
CMAKE_COMPILER_2005 1
)
ENDIF
(
"
${
CMAKE_COMPILER_OUTPUT
}
"
MATCHES
".*VERSION=1[4-9][0-9][0-9].*"
)
ENDIF
(
NOT CMAKE_COMPILER_RETURN
)
MAKE_DIRECTORY
(
"
${
CMAKE_BINARY_DIR
}
/CMakeTmp"
)
# try to figure out if we are running the free command line
# tools from Microsoft. These tools do not provide debug libraries,
# so the link flags used have to be different.
FILE
(
WRITE
${
CMAKE_BINARY_DIR
}
/CMakeTmp/testForFreeVC.cxx
"#include<iostream>
\n
int main(){return 0;}
\n
"
)
EXEC_PROGRAM
(
${
CMAKE_CXX_COMPILER
}
${
CMAKE_BINARY_DIR
}
/CMakeTmp
ARGS /nologo /MD /EHsc
\"
${
CMAKE_
BINARY_DIR
}
/CMakeT
mp/t
estForFreeVC.cxx\"
\"
${
CMAKE_
ROOT
}
/Modules
/CMakeTestForFreeVC.cxx\"
OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT
RETURN_VALUE CMAKE_COMPILER_RETURN
)
MESSAGE
(
"OUTPUT_VARIABLE
${
OUTPUT_VARIABLE
}
"
)
IF
(
CMAKE_COMPILER_RETURN
)
IF
(
"
${
CMAKE_COMPILER_RETURN
}
"
EQUAL
"2"
)
SET
(
CMAKE_USING_VC_FREE_TOOLS 1
)
ELSE
(
"
${
CMAKE_COMPILER_RETURN
}
"
EQUAL
"2"
)
SET
(
CMAKE_USING_VC_FREE_TOOLS 0
)
ENDIF
(
"
${
CMAKE_COMPILER_RETURN
}
"
EQUAL
"2"
)
SET
(
CMAKE_USING_VC_FREE_TOOLS 1
)
ELSE
(
CMAKE_COMPILER_RETURN
)
SET
(
CMAKE_USING_VC_FREE_TOOLS 0
)
ENDIF
(
CMAKE_COMPILER_RETURN
)
ENDIF
(
CMAKE_GENERATOR MATCHES
"NMake Makefiles"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment