diff options
author | Peter Kuemmel <syntheticpp@gmx.net> | 2012-06-08 14:31:54 (GMT) |
---|---|---|
committer | Peter Kuemmel <syntheticpp@gmx.net> | 2012-06-08 15:42:11 (GMT) |
commit | 033a687acd828ad6667d154939ffdbc482ab047f (patch) | |
tree | 7e61efbc88da39b57810be42d502baaab0145136 /Tests/BuildDepends | |
parent | 1d40729eaa35dd643efdf5e793e6a541e890f33a (diff) | |
download | CMake-033a687acd828ad6667d154939ffdbc482ab047f.zip CMake-033a687acd828ad6667d154939ffdbc482ab047f.tar.gz CMake-033a687acd828ad6667d154939ffdbc482ab047f.tar.bz2 |
Ninja: add wrapper for cl to extract dependencies
cmcldeps wraps cl and adds /showInclude before calling cl.
It parses the output of cl for used headers, drops system
headers and writes them to a GCC like dependency file.
cmcldeps uses ATM ninja code for process handling,
but could be ported later to SystemTools.
TODO: Why needs ninja multiple calls in the BuildDepends test?
Diffstat (limited to 'Tests/BuildDepends')
-rw-r--r-- | Tests/BuildDepends/CMakeLists.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Tests/BuildDepends/CMakeLists.txt b/Tests/BuildDepends/CMakeLists.txt index aa32d67..5e36d11 100644 --- a/Tests/BuildDepends/CMakeLists.txt +++ b/Tests/BuildDepends/CMakeLists.txt @@ -28,6 +28,10 @@ function(help_xcode_depends) endif(HELP_XCODE) endfunction(help_xcode_depends) +if("${CMAKE_GENERATOR}" MATCHES "Ninja") + set(HELP_NINJA 1) # TODO Why is this needed? +endif() + # The Intel compiler causes the MSVC linker to crash during # incremental linking, so avoid the /INCREMENTAL:YES flag. if(WIN32 AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel") @@ -154,7 +158,7 @@ try_compile(RESULT OUTPUT_VARIABLE OUTPUT) # Xcode is in serious need of help here -if(HELP_XCODE) +if(HELP_XCODE OR HELP_NINJA) try_compile(RESULT ${BuildDepends_BINARY_DIR}/Project ${BuildDepends_SOURCE_DIR}/Project @@ -165,7 +169,7 @@ if(HELP_XCODE) ${BuildDepends_SOURCE_DIR}/Project testRebuild OUTPUT_VARIABLE OUTPUT) -endif(HELP_XCODE) +endif() message("Output from second build:\n${OUTPUT}") if(NOT RESULT) |