Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Pass include and library directories to try_compile.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 7 Apr 2023 13:23:05 +0000 (15:23 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 7 Apr 2023 14:32:44 +0000 (16:32 +0200)
tools/cmake/Modules/FindNS3.cmake

index 12722f9..9975872 100644 (file)
@@ -129,6 +129,7 @@ endif()
 set(SIMGRID_HAVE_NS3_GetNextEventTime FALSE)
 if(SIMGRID_HAVE_NS3)
   try_compile(compile_ns3 ${CMAKE_BINARY_DIR} ${CMAKE_HOME_DIRECTORY}/tools/cmake/test_prog/prog_ns3.cpp
+              CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${NS3_INCLUDE_DIR}" "-DLINK_DIRECTORIES=${NS3_LIBRARY_PATH}"
               LINK_LIBRARIES "${NS3_LIBRARIES}"
               OUTPUT_VARIABLE compile_ns3_output)
   if(NOT compile_ns3)