Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mc-sog
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PMC-SOG
mc-sog
Commits
cf184c6f
Commit
cf184c6f
authored
5 years ago
by
Jaime Arias
Browse files
Options
Downloads
Patches
Plain Diff
Fix CMake to find spot library
parent
ac81aad5
Branches
main
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+5
-0
5 additions, 0 deletions
.gitignore
CMakeLists.txt
+23
-12
23 additions, 12 deletions
CMakeLists.txt
src/.MCHybridSOG.h.kate-swp
+0
-0
0 additions, 0 deletions
src/.MCHybridSOG.h.kate-swp
src/CMakeLists.txt
+11
-18
11 additions, 18 deletions
src/CMakeLists.txt
with
39 additions
and
30 deletions
.gitignore
+
5
−
0
View file @
cf184c6f
...
...
@@ -139,5 +139,10 @@ local.properties
.sts4-cache/
### Kate ###
# Swap Files #
.*.kate-swp
.swp.*
# End of https://www.gitignore.io/api/c++,cmake
This diff is collapsed.
Click to expand it.
CMakeLists.txt
+
23
−
12
View file @
cf184c6f
...
...
@@ -21,18 +21,29 @@ set(SYLVAN_DIR "${CMAKE_SOURCE_DIR}/third-party/sylvan")
include_directories
(
${
SYLVAN_DIR
}
)
add_subdirectory
(
${
SYLVAN_DIR
}
)
# add spot
include
(
ExternalProject
)
message
(
STATUS
"Building Spot ..."
)
set
(
SPOT_SOURCE_DIR
"
${
CMAKE_SOURCE_DIR
}
/third-party/spot"
)
set
(
SPOT_DIR
"
${
CMAKE_BINARY_DIR
}
/third-party/spot"
)
ExternalProject_Add
(
SpotLibrary
PREFIX
${
SPOT_DIR
}
SOURCE_DIR
${
SPOT_SOURCE_DIR
}
CONFIGURE_COMMAND autoreconf -if
${
SPOT_SOURCE_DIR
}
&&
${
SPOT_SOURCE_DIR
}
/configure --disable-python --prefix=<INSTALL_DIR> --enable-static
BUILD_COMMAND make -j
)
include_directories
(
"
${
SPOT_DIR
}
/include"
)
# build spot if it is not installed on the system
find_library
(
SPOT_LIBRARY
"spot"
)
find_library
(
BDDX_LIBRARY
"bddx"
)
if
(
NOT SPOT_LIBRARY
)
include
(
ExternalProject
)
message
(
STATUS
"Building Spot ..."
)
set
(
SPOT_SOURCE_DIR
"
${
CMAKE_SOURCE_DIR
}
/third-party/spot"
)
set
(
SPOT_DIR
"
${
CMAKE_BINARY_DIR
}
/third-party/spot"
)
ExternalProject_Add
(
SpotLibrary
PREFIX
${
SPOT_DIR
}
SOURCE_DIR
${
SPOT_SOURCE_DIR
}
CONFIGURE_COMMAND autoreconf -if
${
SPOT_SOURCE_DIR
}
&&
${
SPOT_SOURCE_DIR
}
/configure --disable-python --prefix=<INSTALL_DIR>
BUILD_COMMAND make -j
)
include_directories
(
"
${
SPOT_DIR
}
/include"
)
else
()
message
(
STATUS
"Found spot:
${
SPOT_LIBRARY
}
"
)
message
(
STATUS
"Found bddx:
${
BDDX_LIBRARY
}
"
)
endif
()
# add source folder
include_directories
(
src
)
...
...
This diff is collapsed.
Click to expand it.
src/.MCHybridSOG.h.kate-swp
deleted
100644 → 0
+
0
−
0
View file @
ac81aad5
File deleted
This diff is collapsed.
Click to expand it.
src/CMakeLists.txt
+
11
−
18
View file @
cf184c6f
...
...
@@ -6,27 +6,20 @@ find_package(MPI REQUIRED)
include_directories
(
${
MPI_INCLUDE_PATH
}
)
# include openssl
find_package
(
OpenSSL
)
find_package
(
OpenSSL
REQUIRED
)
include_directories
(
${
OPENSSL_INCLUDE_DIR
}
)
include_directories
(
"
${
CMAKE_SOURCE_DIR
}
/third-party/sylvan/src"
)
add_library
(
spot SHARED IMPORTED
)
# or STATIC instead of SHARED
set_target_properties
(
spot PROPERTIES
IMPORTED_LOCATION
"/usr/lib/x86_64-linux-gnu/libspot.so"
INTERFACE_INCLUDE_DIRECTORIES
"/usr/include/spot/"
)
add_library
(
bddx SHARED IMPORTED
)
# or STATIC instead of SHARED
set_target_properties
(
bddx PROPERTIES
IMPORTED_LOCATION
"/usr/lib/x86_64-linux-gnu/libbddx.so"
INTERFACE_INCLUDE_DIRECTORIES
"/usr/include/spot/"
)
# include spot and bddx library
add_library
(
spot SHARED IMPORTED
)
add_library
(
bddx SHARED IMPORTED
)
if
(
NOT SPOT_LIBRARY
)
set_target_properties
(
spot PROPERTIES IMPORTED_LOCATION
"
${
SPOT_DIR
}
/lib/libspot.so"
)
set_target_properties
(
bddx PROPERTIES IMPORTED_LOCATION
"
${
SPOT_DIR
}
/lib/libbddx.so"
)
else
()
set_target_properties
(
spot PROPERTIES IMPORTED_LOCATION
${
BDDX_LIBRARY
}
)
set_target_properties
(
bddx PROPERTIES IMPORTED_LOCATION
${
SPOT_LIBRARY
}
)
endif
()
# Hybrid SOG executable
add_executable
(
hybrid-sog main.cpp
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment