Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Also add the mpich3 binaries in the dependencies of make tests
[simgrid.git] / teshsuite / smpi / mpich3-test / f77 / init / CMakeLists.txt
index 439a7b3..6e51d8d 100644 (file)
@@ -1,6 +1,4 @@
-cmake_minimum_required(VERSION 2.6)
-
-if(enable_smpi)
+if(enable_smpi AND enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN)
   if(WIN32)
     set(CMAKE_C_FLAGS "-include ${CMAKE_HOME_DIRECTORY}/include/smpi/smpi_main.h")
   else()
@@ -8,36 +6,19 @@ if(enable_smpi)
     set(CMAKE_Fortran_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpiff")
   endif()
 
-  set(EXECUTABLE_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}")
-  set(MPICH_FLAGS "-DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRING_H=1 -DUSE_STDARG=1 -DHAVE_LONG_DOUBLE=1 -DHAVE_PROTOTYPES=1 -DHAVE_SIGNAL_H=1 -DHAVE_SIGACTION=1 -DHAVE_SLEEP=1 -DHAVE_SYSCONF=1  -Wno-error=unused-variable -Wno-implicit -Wno-implicit-function-declaration")
-  include_directories("${CMAKE_HOME_DIRECTORY}/include/smpi")
-  include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../include/")
-
-  add_executable(baseenvf baseenvf.f ../util/mtestf.f)
-  target_link_libraries(baseenvf  simgrid)
-  set_target_properties(baseenvf PROPERTIES COMPILE_FLAGS "${MPICH_FLAGS}")
+  include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
 
+  add_executable(baseenvf EXCLUDE_FROM_ALL baseenvf.f)
+  add_dependencies(tests baseenvf)
+  target_link_libraries(baseenvf simgrid mtest_f77)
 endif()
 
-set(tesh_files
-  ${tesh_files}
-  PARENT_SCOPE
-  )
-set(xml_files
-  ${xml_files}
-  PARENT_SCOPE
-  )
 set(examples_src
   ${examples_src}
   ${CMAKE_CURRENT_SOURCE_DIR}/baseenvf.f
-  PARENT_SCOPE
-  )
-set(bin_files
-  ${bin_files}
-  PARENT_SCOPE
-  )
+  ${CMAKE_CURRENT_SOURCE_DIR}/checksizes.c
+  PARENT_SCOPE)
 set(txt_files
   ${txt_files}
   ${CMAKE_CURRENT_SOURCE_DIR}/testlist
-  PARENT_SCOPE
-  )
+  PARENT_SCOPE)