Skip to content

Commit

Permalink
Merge branch 'development' into dash-v0.3.0-changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
devreal authored Nov 9, 2018
2 parents 14d9c6b + 768a304 commit 83d3d11
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 17 deletions.
7 changes: 7 additions & 0 deletions CMakeExt/CompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ if (ENABLE_DEV_COMPILER_WARNINGS
endif()
endif()

if (NOT (ENABLE_DEV_COMPILER_WARNINGS
OR ENABLE_EXT_COMPILER_WARNINGS)
AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "Cray")
set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -Wno-format")
endif()

set (CXX_GDB_FLAG "-g"
CACHE STRING "C++ compiler (clang++) debug symbols flag")
if(OPENMP_FOUND)
Expand Down
18 changes: 11 additions & 7 deletions CMakeExt/GoogleTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ if (BUILD_TESTS)

else()
# Download gtest from official github repository:
message(STATUS "GoogleTest: using GTest from official repository")
set(GTEST_SUBMOD "${CMAKE_SOURCE_DIR}/vendor/googletest")
set(GTEST_PREFIX "${CMAKE_BINARY_DIR}/gtest")
set(GTEST_LOCATION "${GTEST_PREFIX}/src/GTestExternal-build/googlemock/gtest")
Expand All @@ -57,21 +56,24 @@ if (BUILD_TESTS)
set(GTEST_MAINLIB "${GTEST_LOCATION}/${LIBPREFIX}gtest_main${LIBSUFFIX}")

# check whether the submodule has been initialized
file(GLOB gtest_files "${GTEST_SUBMOD}/*")
list(LENGTH gtest_files gtest_file_cnt)
file(GLOB gtest_files "${GTEST_SUBMOD}/*")
list(LENGTH gtest_files gtest_file_cnt)
set (git_res 0)
if (gtest_file_cnt EQUAL 0)
# we first need to initialize the submodule
message(STATUS "GoogleTest: Fetching submodule into vendor/googletest")
execute_process(COMMAND git submodule update --init vendor/googletest
message(STATUS "GoogleTest: using GTest from official repository")
message(STATUS "GoogleTest: Fetching submodule into ${GTEST_SUBMOD}")
execute_process(COMMAND git submodule update --init ${GTEST_SUBMOD}
TIMEOUT 10
RESULT_VARIABLE git_res
OUTPUT_VARIABLE git_out
ERROR_VARIABLE git_err
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
endif()

if (git_res EQUAL 0)
file(GLOB gtest_git_files "${GTEST_SUBMOD}/.git*")
list(LENGTH gtest_git_files gtest_git_file_cnt)
if (NOT gtest_git_file_cnt EQUAL 0 AND git_res EQUAL 0)
# checkout desired version
message(STATUS "GoogleTest: Checking out commit ${GTEST_GIT_TAG}")
execute_process(COMMAND git checkout -q ${GTEST_GIT_TAG}
Expand All @@ -82,7 +84,7 @@ if (BUILD_TESTS)
if (NOT git_res EQUAL 0)
# try to fetch latest commit from origin
message(STATUS "GoogleTest: Checkout failed, trying to fetch latest commit")
execute_process(COMMAND git submodule update --remote vendor/googletest
execute_process(COMMAND git submodule update --remote ${GTEST_SUBMOD}
TIMEOUT 10
RESULT_VARIABLE git_res
OUTPUT_VARIABLE git_out
Expand All @@ -100,6 +102,8 @@ if (BUILD_TESTS)
message(WARNING "GoogleTest: Failed to checkout commit ${GTEST_GIT_TAG}: ${git_err}")
endif()
endif()
elseif (NOT gtest_file_cnt EQUAL 0)
message(STATUS "GoogleTest: using GTest available in ${GTEST_SUBMOD}")
endif()


Expand Down
20 changes: 14 additions & 6 deletions dash/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,14 @@ CXXFLAGS+=-std=c++14
LIBDASH = libdash.a

FILES = Distribution GlobPtr Init Logging Math Mutex StreamConversion \
Team TypeInfo algorithm/SUMMA exception/StackTrace io/IOStream \
util/BenchmarkParams util/Config util/Locality \
util/LocalityDomain util/LocalityJSONPrinter util/TeamLocality \
util/Timer util/TimestampClockPosix util/TimestampCounterPosix \
util/TimestampPAPI util/Trace
Team TypeInfo algorithm/SUMMA allocator/internal/Types \
cpp17/polymorphic_allocator exception/StackTrace io/IOStream \
memory/HBWSpace memory/HostSpace \
memory/internal/MemorySpaceRegistry memory/MemorySpace \
util/BenchmarkParams util/Config util/Locality \
util/LocalityDomain util/LocalityJSONPrinter \
util/TeamLocality util/Timer util/TimestampClockPosix \
util/TimestampCounterPosix util/TimestampPAPI util/Trace

OBJS = $(addsuffix .o, $(FILES))

Expand Down Expand Up @@ -68,9 +71,14 @@ clean :
rm -f *~
rm -f *.o
rm -f algorithm/*.o
rm -f allocator/*.o
rm -f allocator/internal/*.o
rm -f cpp17/*.o
rm -f exception/*.o
rm -f util/*.o
rm -f io/*.o
rm -f memory/*.o
rm -f memory/internal/*.o
rm -f util/*.o
rm -f $(LIBDASH)
rm -f $(STATIC_CONFIG_H)

Expand Down
12 changes: 8 additions & 4 deletions release.pl
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,16 @@
# DASH scripts
#
"dash/scripts/*.sh",
"dash/scripts/dashcc/*.in",
#
"dash/scripts/dashcc/*.in",
#
# Documentation
#
"doc/config/*.dox",
"doc/config/*.in"
"doc/config/*.in",
#
# GoogleTest
#
"vendor/googletest/*"
);


Expand All @@ -149,7 +153,7 @@
if( $file =~ /\.(c|h|cc|cpp)$/ && -e "LICENSE" ) {
system("cat ./LICENSE $file > $base/$file");
} else {
system("cp $file $dirname");
system("cp -r $file $dirname");
}
}
}
Expand Down

0 comments on commit 83d3d11

Please sign in to comment.