Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't had LD_LIBRARY_PATH if it is empty.
[simgrid.git] / CMakeLists.txt
index 8d4633e..401e41e 100644 (file)
@@ -212,9 +212,13 @@ java -cp .:${CMAKE_HOME_DIRECTORY}/examples:${CMAKE_HOME_DIRECTORY}/simgrid.jar
 ##########################################
 # Set the  LD_LIBRARY_PATH for our tests #
 ##########################################
-set_tests_properties(basic pingPong CommTime mutualExclusion
-PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_HOME_DIRECTORY}/lib:$ENV{SIMGRID_ROOT}/lib")
-message(STATUS "export LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_HOME_DIRECTORY}/lib:$ENV{SIMGRID_ROOT}/lib")
+if($ENV{LD_LIBRARY_PATH} STREQUAL "")
+    set_tests_properties(basic pingPong CommTime mutualExclusion
+    PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_HOME_DIRECTORY}/lib:$ENV{SIMGRID_ROOT}/lib")
+else($ENV{LD_LIBRARY_PATH} STREQUAL "")
+    set_tests_properties(basic pingPong CommTime mutualExclusion
+    PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}:${CMAKE_HOME_DIRECTORY}/lib:$ENV{SIMGRID_ROOT}/lib")
+endif($ENV{LD_LIBRARY_PATH} STREQUAL "")
 
 ###########
 # Install #