|
@@ -55,9 +55,19 @@ ExternalProject_Add(${proj}
|
|
|
|
|
|
# This custom external project step forces the build and later
|
|
|
# steps to run whenever a top level build is done...
|
|
|
+#
|
|
|
+# BUILD_ALWAYS flag is available in CMake 3.1 that allows force build
|
|
|
+# of external projects without this workaround. Remove this workaround
|
|
|
+# and use the CMake flag instead, when CTK's required minimum CMake
|
|
|
+# version will be at least 3.1.
|
|
|
+#
|
|
|
+if(CMAKE_CONFIGURATION_TYPES)
|
|
|
+ set(BUILD_STAMP_FILE "${CMAKE_CURRENT_BINARY_DIR}/${proj}-prefix/src/${proj}-stamp/${CMAKE_CFG_INTDIR}/${proj}-build")
|
|
|
+else()
|
|
|
+ set(BUILD_STAMP_FILE "${CMAKE_CURRENT_BINARY_DIR}/${proj}-prefix/src/${proj}-stamp/${proj}-build")
|
|
|
+endif()
|
|
|
ExternalProject_Add_Step(${proj} forcebuild
|
|
|
- COMMAND ${CMAKE_COMMAND} -E remove
|
|
|
- ${CMAKE_CURRENT_BINARY_DIR}/${proj}-prefix/src/${proj}-stamp/${proj}-build
|
|
|
+ COMMAND ${CMAKE_COMMAND} -E remove ${BUILD_STAMP_FILE}
|
|
|
COMMENT "Forcing build step for '${proj}'"
|
|
|
DEPENDEES build
|
|
|
ALWAYS 1
|