Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
finish the conversion of public MACRO names, in the cmake infrastructure
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 5 May 2017 12:58:50 +0000 (14:58 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 5 May 2017 12:58:55 +0000 (14:58 +0200)
Sorry for being a bummer...

19 files changed:
CMakeLists.txt
doc/doxygen/inside_tests.doc
doc/doxygen/ns3.doc
examples/msg/CMakeLists.txt
examples/msg/mc/CMakeLists.txt
examples/smpi/CMakeLists.txt
include/simgrid/modelchecker.h
include/simgrid_config.h.in
src/simix/simcalls.py
teshsuite/mc/CMakeLists.txt
tools/cmake/CTestConfig.cmake
tools/cmake/DefinePackages.cmake
tools/cmake/Distrib.cmake
tools/cmake/MakeLib.cmake
tools/cmake/Modules/FindLuaSimgrid.cmake
tools/cmake/Modules/FindNS3.cmake
tools/cmake/Tests.cmake
tools/cmake/UnitTesting.cmake
tools/cmake/src/internal_config.h.in

index 703224d..0e40eec 100644 (file)
@@ -206,15 +206,17 @@ include(CheckSymbolExists)
 set(HAVE_GRAPHVIZ 0)
 include(FindGraphviz)
 
-set(HAVE_LUA 0)
+set(SIMGRID_HAVE_LUA 0)
 if(enable_lua)
   include(FindLuaSimgrid)
 endif()
 
-set(HAVE_NS3 0)
+set(SIMGRID_SIMGRID_HAVE_NS3 0)
 if(enable_ns3)
   include(FindNS3)
-  if (NOT HAVE_NS3)
+  if (SIMGRID_HAVE_NS3)
+    set(SIMGRID_SIMGRID_HAVE_NS3 1)
+  else()
     message(FATAL_ERROR "Cannot find NS3. Please install it (apt-get install ns3 libns3-dev) or disable that cmake option")
   endif()
 endif()
@@ -365,15 +367,15 @@ else()
 endif()
 
 if(enable_jedule)
-  set(HAVE_JEDULE 1)
+  set(SIMGRID_HAVE_JEDULE 1)
 else()
-  set(HAVE_JEDULE 0)
+  set(SIMGRID_HAVE_JEDULE 0)
 endif()
 
 if(enable_mallocators)
-  SET(HAVE_MALLOCATOR 1)
+  SET(SIMGRID_HAVE_MALLOCATOR 1)
 else()
-  SET(HAVE_MALLOCATOR 0)
+  SET(SIMGRID_HAVE_MALLOCATOR 0)
 endif()
 
 include(FindLibunwind)
@@ -406,13 +408,13 @@ if(enable_model-checking)
   find_package(Libevent REQUIRED)
   include_directories(${LIBDW_INCLUDE_DIR} ${LIBEVENT_INCLUDE_DIR})
   set(SIMGRID_DEP "${SIMGRID_DEP} ${LIBEVENT_LIBRARIES} ${LIBDW_LIBRARIES}")
-  set(HAVE_MC 1)
+  set(SIMGRID_HAVE_MC 1)
   if("${CMAKE_SYSTEM}" MATCHES "FreeBSD" AND enable_java)
     message(WARNING "FreeBSD + Model-Checking + Java = too much for now. Disabling java")
     set(enable_java FALSE)
   endif()
 else()
-  SET(HAVE_MC 0)  
+  SET(SIMGRID_HAVE_MC 0)  
   set(HAVE_MMALLOC 0)
 endif()
 
@@ -963,7 +965,7 @@ message("        LDFlags .....................: ${CMAKE_C_LINK_FLAGS}")
 message("        with LTO ....................: ${enable_lto}")
 message("")
 
-if (HAVE_NS3)
+if (SIMGRID_SIMGRID_HAVE_NS3)
   message("        Compile NS-3 ................: yes (path: ${NS3_PATH})")
 else()
   message("        Compile NS-3 ................: NO  (hint: ${NS3_HINT})")
@@ -975,7 +977,7 @@ if (${Java_FOUND})
 else()
   message("        Compile Java ................: NO")
 endif()
-message("        Compile Lua .................: ${HAVE_LUA}")
+message("        Compile Lua .................: ${SIMGRID_HAVE_LUA}")
 message("        Compile Smpi ................: ${HAVE_SMPI}")
 message("          Smpi fortran ..............: ${SMPI_FORTRAN}")
 message("          MPICH3 testsuite ..........: ${enable_smpi_MPICH3_testsuite}")
@@ -985,8 +987,8 @@ message("        Compile Boost.Context support: ${HAVE_BOOST_CONTEXTS}")
 message("")
 message("        Maintainer mode .............: ${enable_maintainer_mode}")
 message("        Documentation................: ${enable_documentation}")
-message("        Model checking ..............: ${HAVE_MC}")
-message("        Jedule  mode ................: ${HAVE_JEDULE}")
+message("        Model checking ..............: ${SIMGRID_HAVE_MC}")
+message("        Jedule  mode ................: ${SIMGRID_HAVE_JEDULE}")
 message("        Graphviz mode ...............: ${HAVE_GRAPHVIZ}")
 message("        Mallocators .................: ${enable_mallocators}")
 message("")
index d7a7328..337344a 100644 (file)
@@ -78,7 +78,7 @@ your changes should look like that:
 +  src/xbt/plouf.c
    )
 
- if(HAVE_MC)
+ if(SIMGRID_HAVE_MC)
 \endverbatim
 
 Then, you want to actually add your tests in the source file. All the
index 8a9af01..5022462 100644 (file)
@@ -43,7 +43,7 @@ cmake . -Denable_ns3=ON -DNS3_HINT=/opt/ns3 # or change the path if needed
 
 By the end of the configuration, cmake reports whether ns-3 was found,
 and this information is also available in <tt>include/simgrid_config.h</tt>
-If your local copy defines the variable \c HAVE_NS3 to 1, then NS3
+If your local copy defines the variable \c SIMGRID_HAVE_NS3 to 1, then NS3
 was correctly detected. If it's defined to 0, then something went
 wrong. Explore <tt>CMakeFiles/CMakeOutput.log</tt> and
 <tt>CMakeFiles/CMakeError.log</tt> to diagnose the problem.
index 81da7fb..15c5b87 100644 (file)
@@ -23,7 +23,7 @@ foreach(x maestro-set)
   set(tesh_files   ${tesh_files}   ${CMAKE_CURRENT_SOURCE_DIR}/${x}/${x}.tesh)
 endforeach()
 
-if(HAVE_NS3)
+if(SIMGRID_HAVE_NS3)
   add_executable       (network-ns3 network-ns3/network-ns3.c)
   target_link_libraries(network-ns3 simgrid)
   set_target_properties(network-ns3  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/network-ns3)
@@ -128,6 +128,6 @@ ADD_TESH_FACTORIES(app-masterworker-vivaldi     "thread;ucontext;raw;boost" --se
 
 ADD_TESH(msg-app-pmm  --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/msg --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/platforms --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/app-pmm/app-pmm.tesh)
 
-if(HAVE_NS3)
+if(SIMGRID_HAVE_NS3)
   ADD_TESH_FACTORIES(msg-network-ns3 "thread;ucontext;raw;boost" --setenv srcdir=${CMAKE_HOME_DIRECTORY} --cd ${CMAKE_BINARY_DIR}/examples/msg ${CMAKE_HOME_DIRECTORY}/examples/msg/network-ns3/network-ns3.tesh)
 endif()
index d6e288b..2c16afb 100644 (file)
@@ -1,5 +1,5 @@
 foreach (x bugged1 bugged2 bugged3 centralized_mutex electric_fence bugged1_liveness bugged2_liveness)
-  if(HAVE_MC)
+  if(SIMGRID_HAVE_MC)
     add_executable       (${x} ${x}.c)
     target_link_libraries(${x} simgrid)
   endif()
@@ -7,7 +7,7 @@ foreach (x bugged1 bugged2 bugged3 centralized_mutex electric_fence bugged1_live
   set(xml_files     ${xml_files}    ${CMAKE_CURRENT_SOURCE_DIR}/deploy_${x}.xml)
 endforeach()
 
-if(HAVE_MC)
+if(SIMGRID_HAVE_MC)
   if(HAVE_C_STACK_CLEANER)
     add_executable       (bugged1_liveness_cleaner_on  bugged1_liveness.c)
     target_link_libraries(bugged1_liveness_cleaner_on  simgrid)
index 376a992..ace4e78 100644 (file)
@@ -15,7 +15,7 @@ if(enable_smpi)
 
   foreach(x bugged1 bugged2 bugged1_liveness only_send_deterministic mutual_exclusion non_termination1 
             non_termination2 non_termination3 non_termination4)
-    if(HAVE_MC)
+    if(SIMGRID_HAVE_MC)
       add_executable       (smpi_${x} ${CMAKE_CURRENT_SOURCE_DIR}/mc/${x}.c)
       target_link_libraries(smpi_${x} simgrid)
       set_target_properties(smpi_${x} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mc)
@@ -55,7 +55,7 @@ set(txt_files     ${txt_files}     ${CMAKE_CURRENT_SOURCE_DIR}/replay/actions0.t
                                    ${CMAKE_CURRENT_SOURCE_DIR}/replay/split_traces                         PARENT_SCOPE)
 
 if(enable_smpi)
-  if(HAVE_MC)
+  if(SIMGRID_HAVE_MC)
     ADD_TESH(smpi-mc-only-send-determinism --setenv srcdir=${CMAKE_HOME_DIRECTORY}/examples/smpi/mc --cd ${CMAKE_BINARY_DIR}/examples/smpi/mc ${CMAKE_HOME_DIRECTORY}/examples/smpi/mc/only_send_deterministic.tesh)
   endif()
 
index 9a198ec..0b920bb 100644 (file)
@@ -16,6 +16,7 @@
 #define SIMGRID_MODELCHECKER_H
 
 #include <stdbool.h>
+#include <stddef.h> /* size_t */
 
 #include <simgrid_config.h> /* SIMGRID_HAVE_MC ? */
 
index f27c4ac..f2517b4 100644 (file)
@@ -33,14 +33,14 @@ SG_END_DECL()
 #define SIMGRID_VERSION_STRING "@SIMGRID_VERSION_STRING@"
 
 /* Was Jedule compiled in?  */
-#cmakedefine01 HAVE_JEDULE
+#cmakedefine01 SIMGRID_HAVE_JEDULE
 /* Was the Lua support compiled in? */
-#cmakedefine01 HAVE_LUA
+#cmakedefine01 SIMGRID_HAVE_LUA
 /* Were mallocators (object pools) compiled in? */
-#cmakedefine01 HAVE_MALLOCATOR
+#cmakedefine01 SIMGRID_HAVE_MALLOCATOR
 /* Was the model-checking compiled in? */
-#cmakedefine01 HAVE_MC
+#cmakedefine01 SIMGRID_HAVE_MC
 /* Was the NS3 support compiled in? */
-#cmakedefine01 HAVE_NS3
+#cmakedefine01 SIMGRID_HAVE_NS3
 
 #endif /* SIMGRID_PUBLIC_CONFIG_H */
index bc4a5c0..706dc92 100755 (executable)
@@ -290,7 +290,7 @@ if __name__ == '__main__':
 
     fd.write('#include <xbt/base.h>\n')
     fd.write('#include "smx_private.h"\n')
-    fd.write('#if HAVE_MC\n')
+    fd.write('#if SIMGRID_HAVE_MC\n')
     fd.write('#include "src/mc/mc_forward.hpp"\n')
     fd.write('#endif\n')
     fd.write('\n')
index 1e42720..5d42234 100644 (file)
@@ -1,5 +1,5 @@
 foreach(x dwarf dwarf-expression)
-  if (HAVE_MC)
+  if (SIMGRID_HAVE_MC)
     add_executable       (${x}  ${x}/${x}.cpp)
     target_link_libraries(${x}  simgrid)
     set_target_properties(${x}  PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${x})
@@ -28,7 +28,7 @@ set(tesh_files     ${tesh_files}    ${CMAKE_CURRENT_SOURCE_DIR}/random-bug/rando
                                     ${CMAKE_CURRENT_SOURCE_DIR}/mutex-handling/without-mutex-handling.tesh PARENT_SCOPE)
 set(xml_files      ${xml_files}     ${CMAKE_CURRENT_SOURCE_DIR}/mutex-handling/mutex-handling_d.xml        PARENT_SCOPE)
 
-IF(HAVE_MC)
+IF(SIMGRID_HAVE_MC)
   ADD_TESH(tesh-mc-dwarf                       --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/mc/dwarf            --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/mc/dwarf dwarf.tesh)
   ADD_TESH(tesh-mc-dwarf-expression            --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/mc/dwarf-expression --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/mc/dwarf-expression dwarf-expression.tesh)
   ADD_TESH(tesh-mc-mutex-handling              --setenv bindir=${CMAKE_BINARY_DIR}/teshsuite/mc/mutex-handling --setenv srcdir=${CMAKE_HOME_DIRECTORY} --cd ${CMAKE_HOME_DIRECTORY}/teshsuite/mc/mutex-handling mutex-handling.tesh --cfg=model-check/reduction:none)
index 54a297c..42b8753 100644 (file)
@@ -20,7 +20,7 @@ if(enable_compile_warnings AND enable_compile_optimizations)
   SET(BUILDNAME "FULL_FLAGS" CACHE INTERNAL "Buildname" FORCE)
 endif()
 
-if(HAVE_MC)
+if(SIMGRID_HAVE_MC)
   SET(BUILDNAME "MODEL-CHECKING" CACHE INTERNAL "Buildname" FORCE)
 endif()
 
index 3ee6a75..418c5fc 100644 (file)
@@ -786,7 +786,7 @@ set(simgrid_sources
   ${XBT_SRC}
   )
 
-if(${HAVE_JEDULE})  
+if(${SIMGRID_HAVE_JEDULE})  
   set(simgrid_sources  ${simgrid_sources}  ${JEDULE_SRC})
 else()
   set(EXTRA_DIST       ${EXTRA_DIST}       ${JEDULE_SRC})
@@ -796,11 +796,11 @@ if(enable_smpi)
   set(simgrid_sources  ${simgrid_sources}  ${SMPI_SRC})
 endif()
 
-if(HAVE_MC)
+if(SIMGRID_HAVE_MC)
   set(simgrid_sources  ${simgrid_sources}  ${MC_SRC})
 endif()
 
-if(HAVE_NS3)
+if(SIMGRID_HAVE_NS3)
   set(simgrid_sources  ${simgrid_sources}  ${NS3_SRC})
 endif()
 
@@ -814,7 +814,7 @@ if(WIN32)
     )
 endif()
 
-if(HAVE_LUA)
+if(SIMGRID_HAVE_LUA)
   set(simgrid_sources  ${simgrid_sources}  ${LUA_SRC})
 else()
   set(EXTRA_DIST       ${EXTRA_DIST}       ${LUA_SRC})
index 43e867b..d13a04d 100644 (file)
@@ -121,7 +121,7 @@ add_custom_target(uninstall
   COMMAND ${CMAKE_COMMAND} -E  echo "uninstall man ok"
   WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}")
 
-if(HAVE_LUA)
+if(SIMGRID_HAVE_LUA)
   add_custom_command(TARGET uninstall
     COMMAND ${CMAKE_COMMAND} -E echo "uninstall binding lua ok"
     COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_INSTALL_PREFIX}/lib/lua/5.1/simgrid.${LIB_EXE}
index c56ab59..1378bd4 100644 (file)
@@ -39,7 +39,7 @@ if(HAVE_PTHREAD AND ${HAVE_THREAD_CONTEXTS} AND NOT APPLE)
   SET(SIMGRID_DEP "${SIMGRID_DEP} -pthread")
 endif()
 
-if(HAVE_LUA)
+if(SIMGRID_HAVE_LUA)
   ADD_CUSTOM_TARGET(link_simgrid_lua ALL
     DEPENDS    simgrid
     ${CMAKE_BINARY_DIR}/examples/lua/simgrid.${LIB_EXE}
@@ -79,11 +79,11 @@ if(HAVE_GRAPHVIZ)
   endif()
 endif()
 
-if(HAVE_MC AND HAVE_GNU_LD AND NOT ${DL_LIBRARY} STREQUAL "")
+if(SIMGRID_HAVE_MC AND HAVE_GNU_LD AND NOT ${DL_LIBRARY} STREQUAL "")
   SET(SIMGRID_DEP "${SIMGRID_DEP} ${DL_LIBRARY}")
 endif()
 
-if(HAVE_NS3)
+if(SIMGRID_HAVE_NS3)
   SET(SIMGRID_DEP "${SIMGRID_DEP} -lns${NS3_VERSION}-core${NS3_SUFFIX} -lns${NS3_VERSION}-csma${NS3_SUFFIX} -lns${NS3_VERSION}-point-to-point${NS3_SUFFIX} -lns${NS3_VERSION}-internet${NS3_SUFFIX} -lns${NS3_VERSION}-applications${NS3_SUFFIX}")
 endif()
 
index 2904b98..1ac9d00 100644 (file)
@@ -3,7 +3,7 @@
 #  Input variable:
 #     LUA_HINT: path to Lua installation -- only needed for non-standard installs
 #  Output variable:
-#     HAVE_LUA         : if Lua was found
+#     SIMGRID_HAVE_LUA         : if Lua was found
 #     LUA_LIBRARY      : the path to the dynamic library
 #     LUA_INCLUDE_DIR  : where to find lua.h
 #     LUA_VERSION_MAJOR: First part of the version (often, 5)
@@ -56,7 +56,7 @@ unset(lua_version_str)
   
 # Check that we have a sufficient version of Lua
 if(LUA_VERSION_MAJOR EQUAL 5 AND LUA_VERSION_MINOR EQUAL 3)
-  set(HAVE_LUA 1)
+  set(SIMGRID_HAVE_LUA 1)
   include_directories(${LUA_INCLUDE_DIR})
 else()
   message(FATAL_ERROR "Error: Lua version 5.3 is required, but version ${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR} found instead.")
index 750400e..3e61256 100644 (file)
@@ -16,7 +16,7 @@
 #   - Add "ns3.${version}-core ns3.${version}-core-debug ns3.${version}-core-optimized" to the NAME line of the find_library below
 #   - Add "include/ns3{version}" to the PATH_SUFFIXES line of the find_path below
 
-set(HAVE_NS3 0)
+set(SIMGRID_HAVE_NS3 0)
 set(NS3_HINT ${ns3_path} CACHE PATH "Path to search for NS3 lib and include")
 
 find_library(NS3_LIBRARIES
@@ -50,7 +50,7 @@ mark_as_advanced(NS3_LIBRARIES)
 
 if(NS3_INCLUDE_DIR)
   if(NS3_LIBRARIES)
-    set(HAVE_NS3 1)
+    set(SIMGRID_HAVE_NS3 1)
     if(NS3_LIBRARIES MATCHES "-optimized")
       set (NS3_SUFFIX "-optimized")
     elseif(NS3_LIBRARIES MATCHES "-debug")
@@ -78,7 +78,7 @@ if(NS3_INCLUDE_DIR)
 endif()
 mark_as_advanced(NS3_LIBRARY_PATH)
 
-if(HAVE_NS3)
+if(SIMGRID_HAVE_NS3)
   link_directories(${NS3_LIBRARY_PATH})
   include_directories(${NS3_INCLUDE_DIR})
 else()
index f207bfc..6ef6d18 100644 (file)
@@ -57,7 +57,7 @@ IF(enable_java)
   ENDIF()
 ENDIF()
 
-IF(HAVE_MC)
+IF(SIMGRID_HAVE_MC)
   ADD_TESH_FACTORIES(mc-bugged1                "ucontext;raw" --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc bugged1.tesh)
   ADD_TESH_FACTORIES(mc-bugged2                "ucontext;raw" --setenv bindir=${CMAKE_BINARY_DIR}/examples/msg/mc --cd ${CMAKE_HOME_DIRECTORY}/examples/msg/mc bugged2.tesh)
   IF(HAVE_UCONTEXT_CONTEXTS AND SIMGRID_PROCESSOR_x86_64) # liveness model-checking works only on 64bits (for now ...)
@@ -79,7 +79,7 @@ IF(enable_smpi_MPICH3_testsuite AND SMPI_FORTRAN AND HAVE_THREAD_CONTEXTS)
   SET_TESTS_PROPERTIES(test-smpi-mpich3-thread-f90 PROPERTIES PASS_REGULAR_EXPRESSION "tests passed!")
 ENDIF()
 
-IF(HAVE_LUA)
+IF(SIMGRID_HAVE_LUA)
   # Tests testing simulation from C but using lua for platform files. Executed like this
   # ~$ ./masterslave platform.lua deploy.lua
   ADD_TESH(lua-platform-masterslave                --setenv srcdir=${CMAKE_HOME_DIRECTORY}/teshsuite/lua --cd ${CMAKE_BINARY_DIR}/examples/lua ${CMAKE_HOME_DIRECTORY}/teshsuite/lua/lua_platforms.tesh)
index 41ed454..9ba75d7 100644 (file)
@@ -15,7 +15,7 @@ set(FILES_CONTAINING_UNITTESTS
   src/xbt/config.cpp
 )
 
-if(HAVE_MC)
+if(SIMGRID_HAVE_MC)
   set(FILES_CONTAINING_UNITTESTS ${FILES_CONTAINING_UNITTESTS}
       src/mc/PageStore.cpp
       src/mc/mc_snapshot.cpp
index 4bc7710..b98161a 100644 (file)
@@ -66,7 +66,7 @@
 /* process_vm_readv: transfer data between process address spaces */
 #cmakedefine01 HAVE_PROCESS_VM_READV
 /* Set to true if enable_model-checking is true and the dependencies available */
-#cmakedefine01 HAVE_MC
+#cmakedefine01 SIMGRID_HAVE_MC
 
 /* SMPI variables */
 /* SMPI enabled */