Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
margo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
chuck cranor
margo
Commits
3016f1d1
Commit
3016f1d1
authored
Oct 25, 2016
by
chuck cranor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more cmake updates
parent
d6a3475d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
9 deletions
+29
-9
CMakeLists.txt
CMakeLists.txt
+28
-5
tests/CMakeLists.txt
tests/CMakeLists.txt
+1
-4
No files found.
CMakeLists.txt
View file @
3016f1d1
...
...
@@ -35,10 +35,13 @@ if (NOT CMAKE_BUILD_TYPE)
set_property
(
CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug"
"Release"
"RelWithDebInfo"
"MinSizeRel"
)
endif
()
set
(
CMAKE_PREFIX_PATH
""
CACHE
STRING
"Path used to find external dependencies"
)
set
(
BUILD_SHARED_LIBS
"OFF"
CACHE
BOOL
"Build a shared library"
)
set
(
DEBUG_SANITIZER Off CACHE STRING
"Sanitizer for debug builds"
)
set_property
(
CACHE DEBUG_SANITIZER PROPERTY STRINGS
"Off"
"Address"
"Thread"
)
set
(
CMAKE_PREFIX_PATH
""
CACHE STRING
"External dependencies path"
)
set
(
BUILD_SHARED_LIBS
"OFF"
CACHE BOOL
"Build a shared library"
)
set
(
BUILD_EXAMPLES
"OFF"
CACHE BOOL
"Build example programs"
)
set
(
BUILD_TESTS
"OFF"
CACHE BOOL
"Build test programs"
)
find_package
(
mercury CONFIG
)
find_package
(
abt-snoozer CONFIG
)
# will pull argobots and libev for us
...
...
@@ -55,7 +58,27 @@ if (NOT MKTEMP)
message
(
FATAL_ERROR
"Cannot find GNU 'mktemp' program for tests"
)
endif
()
#
# sanitizer config (XXX: does not probe compiler to see if sanitizer flags
# are supported... )
#
set
(
as_flags
"-fsanitize=address,leak -O1 -fno-omit-frame-pointer"
)
set
(
ts_flags
"-fsanitize=thread -O1 -fno-omit-frame-pointer"
)
if
(
${
CMAKE_BUILD_TYPE
}
STREQUAL
"Debug"
)
if
(
${
DEBUG_SANITIZER
}
STREQUAL
"Address"
)
set
(
CMAKE_C_FLAGS_DEBUG
"
${
CMAKE_C_FLAGS_DEBUG
}
${
as_flags
}
"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"
${
CMAKE_C_FLAGS_DEBUG
}
${
as_flags
}
"
)
elseif
(
${
DEBUG_SANITIZER
}
STREQUAL
"Thread"
)
set
(
CMAKE_C_FLAGS_DEBUG
"
${
CMAKE_C_FLAGS_DEBUG
}
${
ts_flags
}
"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"
${
CMAKE_C_FLAGS_DEBUG
}
${
ts_flags
}
"
)
endif
()
endif
()
enable_testing
()
add_subdirectory
(
src
)
if
(
BUILD_EXAMPLES
)
add_subdirectory
(
examples
)
add_subdirectory
(
tests
)
endif
()
if
(
BUILD_TESTS
)
add_subdirectory
(
tests
)
endif
()
tests/CMakeLists.txt
View file @
3016f1d1
...
...
@@ -22,10 +22,7 @@ endforeach ()
foreach
(
lcv
${
margo-tests
}
)
# need a test name... use regex to extract the file basename into ${id}
string
(
REGEX REPLACE
".*/"
""
id
${
lcv
}
)
string
(
REGEX REPLACE
"([A-Za-z0-9_]+)
\\
.c+$"
"
\\
1"
id
${
id
}
)
get_filename_component
(
id
${
lcv
}
NAME_WE
)
# remove extension
add_test
(
NAME
${
id
}
COMMAND env srcdir=
${
CMAKE_SOURCE_DIR
}
TIMEOUT=
${
TIMEOUT
}
...
...
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