Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit 8d14951e authored by gsell's avatar gsell
Browse files

Cleanup CMake files

parent d447b22b
No related branches found
No related tags found
1 merge request!204Resolve "Cleanup CMakeFiles"
......@@ -9,7 +9,7 @@ string (REGEX REPLACE "\\." "" PACKAGE_VERSION ${PACKAGE_VERSION})
message (PACKAGE_VERSION=${PACKAGE_VERSION})
if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
set (CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
FORCE
)
......@@ -41,14 +41,15 @@ set (CMAKE_CXX_STANDARD 11)
set (CMAKE_CXX_STANDARD_REQUIRED ON)
set (CMAKE_CXX_EXTENSIONS OFF)
add_definitions (-DIPPL_LINUX -DIPPL_STRINGSTREAM)
add_definitions (-DIPPL_MPI -DMPICH_SKIP_MPICXX -DIPPL_DONT_POOL)
add_definitions (-DIPPL_MPI)
add_definitions (-DIPPL_DONT_POOL)
add_definitions (-DIPPL_USE_XDIV_RNG)
add_definitions (-DIPPL_USE_PARTIAL_SPECIALIZATION)
add_definitions (-Drestrict=__restrict__ -DNOCTAssert)
add_definitions (-DNOCTAssert)
add_compile_options (-Wall)
add_compile_options (-funroll-loops -fstrict-aliasing)
option (USE_STATIC_LIBRARIES "Link with static libraries if available" ON)
if (NOT ${USE_STATIC_LIBRARIES})
add_compile_options (-fPIE -fPIC)
......@@ -73,7 +74,6 @@ elseif (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
add_compile_options (-ftemplate-depth=1024)
# Allow overloaded virtual functions (instances to be fixed in OPAL)
#add_compile_options (-Wno-overloaded-virtual)
add_definitions(-DIPPL_RESTRICT_BUG)
if (ENABLE_OpenMP)
add_compile_options (-fopenmp)
endif ()
......@@ -280,10 +280,11 @@ install (
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/${PROJECT_NAME}"
RENAME ${PROJECT_NAME}Config.cmake
)
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode:cmake
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode:nil
# indent-tabs-mode: nil
# End:
SET(${PROJECT_NAME}_CMAKE_CXX_FLAGS "${${PROJECT_NAME}_CXX_FLAGS}")
SET(${PROJECT_NAME}_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include")
SET(${PROJECT_NAME}_LIBRARY_DIR "${CMAKE_INSTALL_PREFIX}/lib")
SET(${PROJECT_NAME}_LIBRARY "${CMAKE_INSTALL_PREFIX}/lib/libOPAL.a")
set (${PROJECT_NAME}_CMAKE_CXX_FLAGS "${${PROJECT_NAME}_CXX_FLAGS}")
set (${PROJECT_NAME}_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include")
set (${PROJECT_NAME}_LIBRARY_DIR "${CMAKE_INSTALL_PREFIX}/lib")
set (${PROJECT_NAME}_LIBRARY "${CMAKE_INSTALL_PREFIX}/lib/libOPAL.a")
SET(IPPL_CMAKE_CXX_FLAGS "${IPPL_CMAKE_CXX_FLAGS}")
SET(${PROJECT_NAME}_LIBRARIES
set (${PROJECT_NAME}_LIBRARIES
${GSL_LIBRARY}
${GSL_CBLAS_LIBRARY}
${H5Hut_LIBRARY}
......@@ -20,7 +18,7 @@ SET(${PROJECT_NAME}_LIBRARIES
${CMAKE_DL_LIBS}
)
SET(${PROJECT_NAME}_INCLUDE_DIRS
set (${PROJECT_NAME}_INCLUDE_DIRS
${OPAL_SRC_DIR}
${CLASSIC_SRC_DIR}
${IPPL_INCLUDE_DIR}
......
......@@ -7,9 +7,7 @@ set (IPPL_VERSION_NAME "V${IPPL_VERSION_MAJOR}.${IPPL_VERSION_MINOR}")
set (IPPL_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
if (${CMAKE_BUILD_TYPE} STREQUAL "Release")
add_definitions (-DNOPAssert)
else ()
add_definitions (-DIPPL_DEBUG)
add_definitions (-DNOPAssert)
endif ()
set (IPPL_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src" PARENT_SCOPE)
......@@ -20,15 +18,23 @@ add_subdirectory (src)
option (ENABLE_IPPLTESTS "IPPL Tests" OFF)
if (ENABLE_IPPLTESTS)
add_subdirectory (test)
add_subdirectory (test)
endif ()
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/cmake/${PROJECT_NAME}Config.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config_install.cmake )
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config_install.cmake )
install (
FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config_install.cmake
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/${PROJECT_NAME}"
RENAME ${PROJECT_NAME}Config.cmake
)
FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config_install.cmake
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/cmake/${PROJECT_NAME}"
RENAME ${PROJECT_NAME}Config.cmake
)
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
......@@ -35,7 +35,7 @@ class BrickExpLoop
{
public:
static inline void
apply(LHS& restrict Lhs, RHS& restrict Rhs, OP Op)
apply(LHS& __restrict__ Lhs, RHS& __restrict__ Rhs, OP Op)
{
int n0 = Lhs.size(0);
int n1 = Lhs.size(1);
......@@ -74,7 +74,7 @@ template<class LHS, class RHS, class OP>
class BrickExpLoop<LHS,RHS,OP,1U>
{
public:
static inline void apply(LHS& restrict Lhs, RHS& restrict Rhs, OP Op)
static inline void apply(LHS& __restrict__ Lhs, RHS& __restrict__ Rhs, OP Op)
{
int n0 = Lhs.size(0);
for (int i0=0; i0<n0; ++i0) {
......@@ -90,7 +90,7 @@ class BrickExpLoop<LHS,RHS,OP,2U>
{
public:
static inline void
apply(LHS& restrict Lhs, RHS& restrict Rhs, OP Op)
apply(LHS& __restrict__ Lhs, RHS& __restrict__ Rhs, OP Op)
{
int n0 = Lhs.size(0);
int n1 = Lhs.size(1);
......@@ -109,7 +109,7 @@ class BrickExpLoop<LHS,RHS,OP,3U>
{
public:
static inline void
apply(LHS& restrict Lhs, RHS& restrict Rhs, OP Op)
apply(LHS& __restrict__ Lhs, RHS& __restrict__ Rhs, OP Op)
{
int n0 = Lhs.size(0);
int n1 = Lhs.size(1);
......
......@@ -188,7 +188,7 @@ public:
protected:
void op_pp();
T* restrict Current; // The current datum.
T* __restrict__ Current; // The current datum.
vec<int,Dim> Strides; // The strides in the data.
bool Whole; // True if iterating over whole brick
};
......
......@@ -289,32 +289,6 @@ permute(const CompressedBrickIterator<T,D1>& iter,
unsigned int d1, d2;
#ifdef IPPL_DEBUG
// Do a sanity check.
// Make sure that any indexes in current that don't appear
// in perm have length of 1.
// It is ok to have indexes in perm that don't appear in current.
// They just get zero stride.
// Check each Index in current.
for (d1=0; d1<D1; ++d1)
{
// Compare with every Index in perm.
for (d2=0; d2<D2; ++d2)
// If they match, check the next one.
if ( perm[d2].sameBase( current[d1] ) )
{
goto FoundIt;
}
// Didn't find it.
// Make sure the length is 1.
PAssert_EQ( current[d1].length(), 1 );
FoundIt:
;
}
#endif
// This is the iterator we'll be building.
CompressedBrickIterator<T,D2> permute(iter.GetCompressedData());
if ( iter.IsCompressed() )
......
......@@ -34,7 +34,6 @@ add_subdirectory (extlib)
#-----------------------------------------------------------------------------
# Build liboptp for linking to OPAL
#
add_compile_options (${IPPL_CMAKE_CXX_FLAGS})
include_directories (${CMAKE_CURRENT_SOURCE_DIR})
add_library (optp ${OPTP_SRCS} ${PILOT_OPAL_SRCS})
......@@ -72,3 +71,11 @@ if (ENABLE_DOXYDOC)
)
endif ()
endif ()
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# End:
set (DKS_VERSION_OPAL \"${DKS_VERSION}\")
add_definitions (
"${IPPL_CMAKE_CXX_FLAGS} -DPARALLEL_IO ${CMAKE_CXX_FLAGS}"
)
add_definitions (-DPARALLEL_IO)
if (ENABLE_SAAMG_SOLVER)
set (CMAKE_CXX_FLAGS
"-DHAVE_SAAMG_SOLVER ${CMAKE_CXX_FLAGS}"
)
add_definitions (-DHAVE_SAAMG_SOLVER)
set (SAAMG_SOLVER_LIBS
${Trilinos_LIBRARIES} ${Trilinos_TPL_LIBRARIES}
${Fortran_LIBS}
......@@ -22,21 +18,18 @@ if (ENABLE_AMR)
${Fortran_LIBS}
${AMREX_EXTRA_Fortran_LINK_LINE}
${AMREX_LIBRARIES}
)
)
else (ENABLE_AMR)
set(AMR_LIBS "")
endif (ENABLE_AMR)
endif ()
if (ENABLE_AMR AND ENABLE_AMR_MG_SOLVER)
set (CMAKE_CXX_FLAGS
"-DHAVE_AMR_MG_SOLVER ${CMAKE_CXX_FLAGS}"
)
add_definitions (-DHAVE_AMR_MG_SOLVER)
set (AMR_MG_SOLVER_LIBS
${Trilinos_LIBRARIES} ${Trilinos_TPL_LIBRARIES})
else (ENABLE_AMR AND ENABLE_AMR_MG_SOLVER)
else ()
set (AMR_MG_SOLVER_LIBS "")
endif(ENABLE_AMR AND ENABLE_AMR_MG_SOLVER)
endif ()
configure_file(config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/OPALconfig.h)
configure_file(revision.h.in ${CMAKE_CURRENT_SOURCE_DIR}/OPALrevision.h)
......@@ -73,8 +66,8 @@ macro (ADD_OPAL_HEADERS )
endif ()
endmacro ()
ADD_OPAL_SOURCES(opal.cpp)
ADD_OPAL_SOURCES(changes.cpp)
add_opal_sources (opal.cpp)
add_opal_sources (changes.cpp)
add_subdirectory (AbstractObjects)
add_subdirectory (Algebra)
......@@ -106,7 +99,7 @@ if (ENABLE_AMR)
add_subdirectory (Amr)
endif ()
include_directories ( BEFORE
include_directories (BEFORE
${OPAL_SRC_DIR}
${CLASSIC_SRC_DIR}
${IPPL_INCLUDE_DIR}
......@@ -185,12 +178,9 @@ set (HDRS
install (FILES ${HDRS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/src")
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode:cmake
# cmake-tab-width: 4
# indent-tabs-mode:nil
# End:
#Turn on gcov
#set(CMAKE_CXX_FLAGS "-g -O0 -Wall -fprofile-arcs -ftest-coverage")
#set(CMAKE_CXX_OUTPUT_EXTENSION_REPLACE 1)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment