Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
interacting with jenkins on a windows VM through git is a pure instant of joy
[simgrid.git] / tools / tesh / CMakeLists.txt
index e542aed..c099aa1 100644 (file)
@@ -1,19 +1,25 @@
 cmake_minimum_required(VERSION 2.6)
 
 if(WIN32)
-  add_custom_target(tesh ALL
-    DEPENDS ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl
-    COMMENT "Install ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl"
-    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl ${CMAKE_BINARY_DIR}/bin/tesh
-    )
-else(WIN32)
+  #add_custom_target(tesh ALL
+  #  DEPENDS ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl
+  #  COMMENT "Install ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl"
+  #  COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl ${CMAKE_BINARY_DIR}/bin/tesh
+  #  )
+    
+    file(COPY        ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Scripts/tesh.pl 
+         DESTINATION ${CMAKE_BINARY_DIR}/bin/
+         FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
+                          GROUP_EXECUTE GROUP_READ)
+    file(RENAME ${CMAKE_BINARY_DIR}/bin/tesh.pl ${CMAKE_BINARY_DIR}/bin/tesh)                    
+else()
   set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
 
   add_executable(tesh tesh.c run_context.c signal.c)
 
   ### Add definitions for compile
-  target_link_libraries(tesh gras m pthread)
-endif(WIN32)
+  target_link_libraries(tesh simgrid m pthread)
+endif()
 
 set(tesh_files
   ${tesh_files}