Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
batsim
batsim
Commits
2fd7f66b
Commit
2fd7f66b
authored
Sep 21, 2016
by
Millian Poquet
Browse files
CMake update to match the new SimGrid version
parent
0ee41e1e
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
2fd7f66b
...
...
@@ -81,7 +81,7 @@ file(GLOB batsim_SRC
add_executable
(
batsim
${
batsim_SRC
}
)
# Libraries to link
target_link_libraries
(
batsim
${
SIMGRID_LIBRAR
IES
}
target_link_libraries
(
batsim
${
SIMGRID_LIBRAR
Y
}
${
Boost_FILESYSTEM_LIBRARY_DEBUG
}
${
Boost_LOCALE_LIBRARY_DEBUG
}
${
Boost_REGEX_LIBRARY_DEBUG
}
...
...
cmake/Modules/FindSimGrid.cmake
View file @
2fd7f66b
# Try fo find Simgrid:
# SIMGRID_FOUND
# SIMGRID_INCLUDE_DIRS
# SIMGRID_LIBRARIES
# SIMGRID_DEFINITIONS
#IF YOU HAVE INSTALL SIMGRID IN A SPECIAL DIRECTORY
#YOU CAN SPECIFY SIMGRID_ROOT
message
(
"-- Looking for simgrid.h"
)
find_path
(
SIMGRID_INCLUDE_DIR
NAMES simgrid.h
HINTS ENV SIMGRID_PATH ENV INCLUDE ENV CPATH
PATHS /opt/simgrid /opt/Simgrid
PATH_SUFFIXES include
)
message
(
"-- Looking for simgrid.h -
${
SIMGRID_INCLUDE_DIR
}
"
)
# TO CALL THIS FILE USE
#set(CMAKE_MODULE_PATH
#${CMAKE_MODULE_PATH}
#${CMAKE_HOME_DIRECTORY}/tools/cmake/Modules
#)
message
(
"-- Looking for libsimgrid"
)
find_library
(
SIMGRID_LIBRARY
NAMES simgrid
HINTS ENV SIMGRID_PATH ENV LIBRARY_PATH
PATHS /opt/simgrid /opt/Simgrid
PATH_SUFFIXES lib
)
message
(
"-- Looking for libsimgrid --
${
SIMGRID_LIBRARY
}
"
)
find_library
(
HAVE_SIMGRID_LIB
NAME simgrid
HINTS
$ENV{LD_LIBRARY_PATH}
$ENV{SIMGRID_ROOT}
PATH_SUFFIXES lib64 lib
PATHS
/opt
/opt/local
/opt/csw
/sw
/usr
)
set
(
SIMGRID_LIBRARIES
${
SIMGRID_LIBRARY
}
)
set
(
SIMGRID_INCLUDE_DIRS
${
SIMGRID_INCLUDE_DIR
}
)
find_program
(
HAVE_TESH
NAMES tesh
HINTS
$ENV{SIMGRID_ROOT}
PATH_SUFFIXES bin
PATHS
/opt
/opt/local
/opt/csw
/sw
/usr
)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
SimGrid DEFAULT_MSG
SIMGRID_LIBRARY SIMGRID_INCLUDE_DIR
)
mark_as_advanced
(
SIMGRID_INCLUDE_DIR SIMGRID_LIBRARY
)
\ No newline at end of file
message
(
STATUS
"Looking for lib SimGrid"
)
if
(
HAVE_SIMGRID_LIB
)
message
(
STATUS
"Looking for lib SimGrid - found"
)
get_filename_component
(
simgrid_version
${
HAVE_SIMGRID_LIB
}
REALPATH
)
string
(
REPLACE
"
${
HAVE_SIMGRID_LIB
}
."
""
simgrid_version
"
${
simgrid_version
}
"
)
string
(
REGEX MATCH
"^[0-9]"
SIMGRID_MAJOR_VERSION
"
${
simgrid_version
}
"
)
string
(
REGEX MATCH
"^[0-9].[0-9]"
SIMGRID_MINORœ_VERSION
"
${
simgrid_version
}
"
)
string
(
REGEX MATCH
"^[0-9].[0-9].[0-9]"
SIMGRID_PATCH_VERSION
"
${
simgrid_version
}
"
)
string
(
REGEX REPLACE
"^
${
SIMGRID_MINOR_VERSION
}
."
""
SIMGRID_PATCH_VERSION
"
${
SIMGRID_PATCH_VERSION
}
"
)
string
(
REGEX REPLACE
"^
${
SIMGRID_MAJOR_VERSION
}
."
""
SIMGRID_MINOR_VERSION
"
${
SIMGRID_MINOR_VERSION
}
"
)
message
(
STATUS
"Simgrid version :
${
SIMGRID_MAJOR_VERSION
}
.
${
SIMGRID_MINOR_VERSION
}
"
)
else
()
message
(
STATUS
"Looking for lib SimGrid - not found"
)
endif
()
if
(
HAVE_TESH
)
message
(
STATUS
"Found Tesh:
${
HAVE_TESH
}
"
)
endif
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment