From: Martin Quinson Date: Sat, 25 Jul 2015 12:04:30 +0000 (+0200) Subject: further cleanups of NS3 detection X-Git-Tag: v3_12~406 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/5960f4118ff88d4f39043e486fb56f73d64b15ef further cleanups of NS3 detection --- diff --git a/buildtools/Cmake/Modules/FindNS3.cmake b/buildtools/Cmake/Modules/FindNS3.cmake index 250dfedf0e..075be6d360 100644 --- a/buildtools/Cmake/Modules/FindNS3.cmake +++ b/buildtools/Cmake/Modules/FindNS3.cmake @@ -1,6 +1,6 @@ # Try to find the NS3 library. # -# The user can hint a path using the ns3_path option. +# The user can hint a path using the NS3_HINT option. # # Once done, the following will be defined: # @@ -18,19 +18,20 @@ # - Add include/ns3{version} to the PATH_SUFFIXES line of the find_path below set(HAVE_NS3 0) +set(NS3_HINT ${ns3_path} CACHE PATH "Path to search for NS3 lib and include") find_library(NS3_LIBRARIES NAME ns3-core ns3.14-core ns3.15-core ns3.16-core ns3.17-core ns3.18-core ns3.19-core ns3.20-core ns3.21-core ns3.22-core PATH_SUFFIXES lib64 lib ns3/lib PATHS - ${ns3_path} + ${NS3_HINT} ) find_path(NS3_INCLUDE_DIR NAME ns3/core-module.h PATH_SUFFIXES include ns3/include include/ns3.14 include/ns3.15 include/ns3.16 include/ns3.17 include/ns3.18 include/ns3.19 include/ns3.20 include/ns3.21 include/ns3.22 PATHS - ${ns3_path} + ${NS3_HINT} ) @@ -74,6 +75,8 @@ if(NS3_INCLUDE_DIR) endif() mark_as_advanced(NS3_LIBRARY_PATH) +message("NS3_VERSION_MINOR: ${NS3_VERSION_MINOR}") +message("NS3_LIBRARIES: ${NS3_LIBRARIES}") if(HAVE_NS3) link_directories(${NS3_LIBRARY_PATH}) diff --git a/buildtools/Cmake/Option.cmake b/buildtools/Cmake/Option.cmake index 89e69696ad..bf78d25b13 100644 --- a/buildtools/Cmake/Option.cmake +++ b/buildtools/Cmake/Option.cmake @@ -3,7 +3,6 @@ set(BIBTEX2HTML ${BIBTEX2HTML} CACHE PATH "Path to bibtex2html") set(gtnets_path ${gtnets_path} CACHE PATH "Path to gtnets lib and include") -set(ns3_path ${ns3_path} CACHE PATH "Path to ns3 lib and include") if(NOT CMAKE_INSTALL_PREFIX) set(CMAKE_INSTALL_PREFIX "/usr/local/simgrid/" CACHE PATH "Path where this project should be installed") diff --git a/buildtools/Cmake/PrintArgs.cmake b/buildtools/Cmake/PrintArgs.cmake index 84485c985e..87df30f9f9 100644 --- a/buildtools/Cmake/PrintArgs.cmake +++ b/buildtools/Cmake/PrintArgs.cmake @@ -109,9 +109,9 @@ else() message(" Compile Gtnets ..............: NO (path: ${gtnets_path})") endif() if (HAVE_NS3) - message(" Compile NS-3 ................: yes (path: ${ns3_path})") + message(" Compile NS-3 ................: yes (path: ${NS3_PATH})") else() - message(" Compile NS-3 ................: NO (path: ${ns3_path})") + message(" Compile NS-3 ................: NO (hint: ${NS3_HINT})") endif() message(" Compile Java ................: ${HAVE_Java}")