[cmake-developers] Experimental BuildDepends test passed, but does not work?

Claus Klein claus.klein at arcormail.de
Sat Jul 21 11:47:44 EDT 2012


On 21.07.2012, at 13:24, David Cole wrote:

> The code for this test is difficult to understand. It all happens at
> configure-time of the test project via execute_process in the
> CMakeLists file.
>
> Maybe there is a subtle problem in the test's code itself, but if so,
> it's subtler than I can see...
>
> This test has been around for a very long time, since before we had
> "cmake --build" on the command line. Perhaps it should be re-written
> using cmake --build or ExternalProject to make it easier to
> understand.
>
> The intent behind the test is simply to ensure that changing a header
> file results in the proper re-compiling of c++ files that include it
> when the change is followed by an incremental build.
> --

Yes, it seems like a big hack!
I can't see how the generator is tested, when the cmake compiles the  
objects itself?


diff --git a/Tests/BuildDepends/CMakeLists.txt b/Tests/BuildDepends/ 
CMakeLists.txt
index 5e36d11..9a4fb92 100644
--- a/Tests/BuildDepends/CMakeLists.txt
+++ b/Tests/BuildDepends/CMakeLists.txt
@@ -28,10 +28,6 @@ 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")
@@ -158,7 +154,7 @@ try_compile(RESULT
    OUTPUT_VARIABLE OUTPUT)

  # Xcode is in serious need of help here
-if(HELP_XCODE OR HELP_NINJA)	<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+if(HELP_XCODE )
    try_compile(RESULT
      ${BuildDepends_BINARY_DIR}/Project
      ${BuildDepends_SOURCE_DIR}/Project
claus-kleins-macbook-pro:cmake clausklein$

What means this HELP_XXXX ?

Claus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120721/8e8ae0cc/attachment.html>


More information about the cmake-developers mailing list