Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use configure_file(... COPYONLY) instead of file(COPY ...).
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 12 Nov 2012 20:19:11 +0000 (21:19 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 12 Nov 2012 20:19:11 +0000 (21:19 +0100)
file(COPY ...) does not exist in cmake before 2.8.

teshsuite/smpi/mpich-test/CMakeLists.txt

index ca3a518..f5c12a7 100644 (file)
@@ -60,10 +60,8 @@ else()
     foreach(srcfile ${stdo_std_smpi})
         set(dstfile ${srcfile})
         string(REPLACE "${CMAKE_HOME_DIRECTORY}" "${CMAKE_BINARY_DIR}" dstfile "${dstfile}")
     foreach(srcfile ${stdo_std_smpi})
         set(dstfile ${srcfile})
         string(REPLACE "${CMAKE_HOME_DIRECTORY}" "${CMAKE_BINARY_DIR}" dstfile "${dstfile}")
-        string(REGEX REPLACE "/[^/]*.stdo" "/" dstfile "${dstfile}")
-        string(REGEX REPLACE "/[^/]*.std" "/" dstfile "${dstfile}")
         #message("copy ${srcfile} to ${dstfile}")
         #message("copy ${srcfile} to ${dstfile}")
-        file(COPY ${srcfile} DESTINATION ${dstfile})
+        configure_file("${srcfile}" "${dstfile}" COPYONLY)
     endforeach()
 endif()
 
     endforeach()
 endif()