|
@@ -34,6 +34,12 @@ if(WIN32 AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel")
|
|
|
set(_cmake_options "-DCMAKE_EXE_LINKER_FLAGS=")
|
|
set(_cmake_options "-DCMAKE_EXE_LINKER_FLAGS=")
|
|
|
endif()
|
|
endif()
|
|
|
|
|
|
|
|
|
|
+if("${CMAKE_GENERATOR}" MATCHES "Make")
|
|
|
|
|
+ set(TEST_LINK_DEPENDS ${BuildDepends_BINARY_DIR}/Project/linkdep.txt)
|
|
|
|
|
+ file(WRITE ${TEST_LINK_DEPENDS} "1")
|
|
|
|
|
+endif()
|
|
|
|
|
+list(APPEND _cmake_options "-DTEST_LINK_DEPENDS=${TEST_LINK_DEPENDS}")
|
|
|
|
|
+
|
|
|
file(MAKE_DIRECTORY ${BuildDepends_BINARY_DIR}/Project)
|
|
file(MAKE_DIRECTORY ${BuildDepends_BINARY_DIR}/Project)
|
|
|
message("Creating Project/foo.cxx")
|
|
message("Creating Project/foo.cxx")
|
|
|
write_file(${BuildDepends_BINARY_DIR}/Project/foo.cxx
|
|
write_file(${BuildDepends_BINARY_DIR}/Project/foo.cxx
|
|
@@ -131,6 +137,10 @@ file(WRITE ${BuildDepends_BINARY_DIR}/Project/zot_macro_dir.hxx
|
|
|
file(WRITE ${BuildDepends_BINARY_DIR}/Project/zot_macro_tgt.hxx
|
|
file(WRITE ${BuildDepends_BINARY_DIR}/Project/zot_macro_tgt.hxx
|
|
|
"static const char* zot_macro_tgt = \"zot_macro_tgt changed\";\n")
|
|
"static const char* zot_macro_tgt = \"zot_macro_tgt changed\";\n")
|
|
|
|
|
|
|
|
|
|
+if(TEST_LINK_DEPENDS)
|
|
|
|
|
+ file(WRITE ${TEST_LINK_DEPENDS} "2")
|
|
|
|
|
+endif()
|
|
|
|
|
+
|
|
|
help_xcode_depends()
|
|
help_xcode_depends()
|
|
|
|
|
|
|
|
message("Building project second time")
|
|
message("Building project second time")
|
|
@@ -194,3 +204,16 @@ if("${out}" STREQUAL "${VALUE_CHANGED}")
|
|
|
else("${out}" STREQUAL "${VALUE_CHANGED}")
|
|
else("${out}" STREQUAL "${VALUE_CHANGED}")
|
|
|
message(SEND_ERROR "Project did not rebuild properly!")
|
|
message(SEND_ERROR "Project did not rebuild properly!")
|
|
|
endif("${out}" STREQUAL "${VALUE_CHANGED}")
|
|
endif("${out}" STREQUAL "${VALUE_CHANGED}")
|
|
|
|
|
+
|
|
|
|
|
+if(TEST_LINK_DEPENDS)
|
|
|
|
|
+ set(linkdep ${BuildDepends_BINARY_DIR}/Project/linkdep${CMAKE_EXECUTABLE_SUFFIX})
|
|
|
|
|
+ if(${linkdep} IS_NEWER_THAN ${TEST_LINK_DEPENDS})
|
|
|
|
|
+ message("LINK_DEPENDS worked")
|
|
|
|
|
+ else()
|
|
|
|
|
+ message(SEND_ERROR "LINK_DEPENDS failed. Executable
|
|
|
|
|
+ ${linkdep}
|
|
|
|
|
+is not newer than dependency
|
|
|
|
|
+ ${TEST_LINK_DEPENDS}
|
|
|
|
|
+")
|
|
|
|
|
+ endif()
|
|
|
|
|
+endif()
|