Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Do not load internal headers when compiling the examples
[simgrid.git] / tools / cmake / UnitTesting.cmake
index fe83e00..cd3f9a4 100644 (file)
@@ -5,17 +5,15 @@
 # FILES_CONTAINING_UNITTESTS and have a pleasant day.
 
 set(FILES_CONTAINING_UNITTESTS
-  src/xbt/cunit.c
-  src/xbt/ex.c
-  src/xbt/dynar.c
-  src/xbt/dict.c
-  src/xbt/swag.c
-  src/xbt/xbt_str.c
-  src/xbt/xbt_strbuff.c
-  src/xbt/config.c
+  src/xbt/cunit.cpp
+  src/xbt/ex.cpp
+  src/xbt/dynar.cpp
+  src/xbt/dict.cpp
+  src/xbt/xbt_str.cpp
+  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
@@ -48,4 +46,9 @@ ADD_CUSTOM_COMMAND(
 
 add_executable       (testall ${EXTRACTED_TEST_SOURCE_FILES})
 target_link_libraries(testall simgrid)
+set_property(
+    TARGET testall
+    APPEND PROPERTY
+           INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}"
+          )