[Cmake-commits] CMake branch, next, updated. v3.0.0-rc2-1356-gbe51df2

Stephen Kelly steveire at gmail.com
Thu Mar 20 18:18:09 EDT 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  be51df2412f0fc85b3407f105d440d8be09783d5 (commit)
       via  e71dedcfeda325be851deb530d4d2fb6fc5a9ad1 (commit)
      from  e917c9e1b76e888aa13e860e136a91abfe0b1ad2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=be51df2412f0fc85b3407f105d440d8be09783d5
commit be51df2412f0fc85b3407f105d440d8be09783d5
Merge: e917c9e e71dedc
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Mar 20 18:18:08 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Mar 20 18:18:08 2014 -0400

    Merge topic 'fix-Qt4-moc-commands-depends' into next
    
    e71dedcf Use try_compile in test.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e71dedcfeda325be851deb530d4d2fb6fc5a9ad1
commit e71dedcfeda325be851deb530d4d2fb6fc5a9ad1
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu Mar 20 23:17:29 2014 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Thu Mar 20 23:17:29 2014 +0100

    Use try_compile in test.
    
    Ensure that the CMAKE_MAKE_PROGRAM and configuration etc are
    propagated.

diff --git a/Tests/Qt4Targets/CMakeLists.txt b/Tests/Qt4Targets/CMakeLists.txt
index 05397e7..012a561 100644
--- a/Tests/Qt4Targets/CMakeLists.txt
+++ b/Tests/Qt4Targets/CMakeLists.txt
@@ -38,17 +38,23 @@ target_include_directories(Qt4WrapMacroTest PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}
 target_link_libraries(Qt4WrapMacroTest Qt4::QtGui)
 
 set(timeformat "%Y%j%H%M%S")
-file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/IncrementalMocBuild")
-execute_process(COMMAND "${CMAKE_COMMAND}" -DADD_DEF=0 "-H${CMAKE_CURRENT_SOURCE_DIR}/IncrementalMoc" "-B${CMAKE_CURRENT_BINARY_DIR}/IncrementalMocBuild" "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}")
-execute_process(COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}/IncrementalMocBuild")
+try_compile(RESULT
+  "${CMAKE_CURRENT_BINARY_DIR}/IncrementalMocBuild"
+  "${CMAKE_CURRENT_SOURCE_DIR}/IncrementalMoc"
+  IncrementalMoc
+  CMAKE_FLAGS -DADD_DEF=0)
 file(TIMESTAMP "${CMAKE_CURRENT_BINARY_DIR}/IncrementalMocBuild/moc_foo.cpp" tsvar_before "${timeformat}")
 if (NOT tsvar_before)
   message(SEND_ERROR "Unable to read timestamp from moc file from first build!")
 endif()
 
 execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 2) # Ensure that the timestamp will change.
-execute_process(COMMAND "${CMAKE_COMMAND}" -DADD_DEF=1 "${CMAKE_CURRENT_BINARY_DIR}/IncrementalMocBuild" "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}")
-execute_process(COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}/IncrementalMocBuild")
+
+try_compile(RESULT
+  "${CMAKE_CURRENT_BINARY_DIR}/IncrementalMocBuild"
+  "${CMAKE_CURRENT_SOURCE_DIR}/IncrementalMoc"
+  IncrementalMoc
+  CMAKE_FLAGS -DADD_DEF=1)
 file(TIMESTAMP "${CMAKE_CURRENT_BINARY_DIR}/IncrementalMocBuild/moc_foo.cpp" tsvar_after "${timeformat}")
 if (NOT tsvar_after)
   message(SEND_ERROR "Unable to read timestamp from moc file from second build!")

-----------------------------------------------------------------------

Summary of changes:
 Tests/Qt4Targets/CMakeLists.txt |   16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list