If you are using GitLab outside of the ILL, then you will need to use HTTPS and not SSH for clone/push/pull operations. SSH will work normally if you are using the VPN.

Commit 28243aa6 authored by Tobias WEBER's avatar Tobias WEBER

continued make lists clean up

parent 32b78cdb
......@@ -8,18 +8,49 @@
project(takin)
cmake_minimum_required(VERSION 3.0)
# release or debug build?
set(DEBUG FALSE)
# native or mingw build?
set(BUILD_FOR_MINGW FALSE)
#set(BUILD_FOR_MINGW TRUE)
set(CMAKE_VERBOSE_MAKEFILE TRUE)
set(CMAKE_BUILD_TYPE Release)
#set(CMAKE_BUILD_TYPE Debug)
#set(CMAKE_CXX_STANDARD 11)
#set(BUILD_SHARED_LIBS TRUE)
if(DEBUG)
message("Doing a DEBUG build.")
set(CMAKE_VERBOSE_MAKEFILE TRUE)
set(CMAKE_BUILD_TYPE Debug)
set(Boost_DEBUG TRUE)
set(Boost_USE_DEBUG_LIBS TRUE)
set(Boost_USE_RELEASE_LIBS FALSE)
add_definitions(-DDEBUG)
add_definitions(-ggdb)
add_definitions(-Wall -Wpedantic -Wextra -Wno-unused-local-typedefs -Wno-unused-parameter)
else()
message("Doing a RELEASE build.")
set(CMAKE_VERBOSE_MAKEFILE FALSE)
set(CMAKE_BUILD_TYPE Release)
set(Boost_DEBUG FALSE)
set(Boost_USE_DEBUG_LIBS FALSE)
set(Boost_USE_RELEASE_LIBS TRUE)
add_definitions(-DNDEBUG -DQT_NO_DEBUG)
#add_definitions(-march=native -s)
endif()
set(CMAKE_CXX_STANDARD 11)
set(USE_TR1_FUNCS FALSE)
set(USE_PLUGINS TRUE)
add_definitions(-std=c++11)
#add_definitions(-rdynamic -fPIC)
if(BUILD_FOR_MINGW)
# stuff needed by mingw
......@@ -40,9 +71,6 @@ set(CMAKE_BINARY_DIR "${CMAKE_SOURCE_DIR}")
set(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/plugins")
set(Boost_DEBUG FALSE)
set(Boost_USE_DEBUG_LIBS FALSE)
set(Boost_USE_RELEASE_LIBS TRUE)
set(Boost_FIND_QUIETLY FALSE)
set(BOOST_COMPS program_options iostreams filesystem system)
......@@ -118,7 +146,9 @@ message("CMake source dir: ${CMAKE_SOURCE_DIR}")
message("CMake binary dir: ${CMAKE_BINARY_DIR}")
message("Install path prefix: ${CMAKE_INSTALL_PREFIX}")
message("Using Qt version ${Qt5Core_VERSION}")
#message("Using Qwt version ${QWT_MAJOR_VERSION}")
if(NOT "${QWT_MAJOR_VERSION}" STREQUAL "")
message("Using Qwt version ${QWT_MAJOR_VERSION}")
endif()
message("Using Boost version ${Boost_VERSION}")
message("Using Zlib version ${ZLIB_VERSION_STRING}")
message("Using Bzip2 version ${BZIP2_VERSION_STRING}")
......@@ -128,7 +158,6 @@ endif()
message("Qt moc: ${QT_MOC_EXECUTABLE}\nQt uic: ${QT_UIC_EXECUTABLE}")
add_definitions(-DNDEBUG)
add_definitions(-DUSE_NET -DUSE_CIF)
add_definitions(-DNO_LAPACK)
add_definitions(-DNO_JPEG -DNO_TIFF)
......@@ -246,9 +275,6 @@ set(CMAKE_AUTOMOC OFF)
set(CMAKE_AUTOUIC OFF)
set(CMAKE_AUTORCC OFF)
add_definitions(-std=c++11)
#add_definitions(-march=native -s)
# -----------------------------------------------------------------------------
......
......@@ -61,7 +61,7 @@ static void print_matrix(std::ostream& ostr, const t_mat& mat)
ostr << "\t<td>" << mat(i,j) << "</td>";
ostr << "</tr>\n";
}
};
}
static t_vec get_vec(const QLineEdit* pEdit)
......@@ -73,7 +73,7 @@ static t_vec get_vec(const QLineEdit* pEdit)
vec.resize(3,1);
return vec;
};
}
// ----------------------------------------------------------------------------
......
......@@ -271,7 +271,7 @@ ifeq ($(DO_DEBUG), 0)
FLAGS += ${DEFINES}
STRIP = strip -v
else
FLAGS = ${INC} ${STD_CPP} ${SYS_FLAGS} -rdynamic -ggdb -DDEBUG -Wall -Wall -Wpedantic -Wextra -Weffc++ -fPIC ${DEFINES}
FLAGS = ${INC} ${STD_CPP} ${SYS_FLAGS} -rdynamic -fPIC -ggdb -DDEBUG -Wall -Wpedantic -Wextra -Weffc++ ${DEFINES}
STRIP = echo Retaining debug symbols of
endif
......
......@@ -112,9 +112,8 @@ SqwPy::SqwPy(const std::string& strFile) : m_pmtx(std::make_shared<std::mutex>()
SqwPy::~SqwPy()
{
tl::log_debug("Unloading Python interpreter.");
Py_FinalizeEx();
tl::log_debug("Unloaded Python interpreter.");
//tl::log_debug("Unloading Python interpreter.");
//Py_FinalizeEx();
}
......
......@@ -113,6 +113,7 @@ std::vector<std::tuple<std::string, std::string>> get_sqw_names()
return vec;
}
std::shared_ptr<SqwBase> construct_sqw(const std::string& strName,
const std::string& strConfigFile)
{
......@@ -135,9 +136,11 @@ std::shared_ptr<SqwBase> construct_sqw(const std::string& strName,
namespace so = boost::dll;
// tracking modules for refcounting
static std::vector<std::shared_ptr<so::shared_library>> g_vecMods;
void unload_sqw_plugins()
{
for(auto& pMod : g_vecMods)
......@@ -166,6 +169,7 @@ void unload_sqw_plugins()
tl::log_debug("Unloaded all plugins.");
}
void load_sqw_plugins()
{
static bool bPluginsLoaded = 0;
......@@ -234,11 +238,14 @@ void load_sqw_plugins()
}
}
tl::log_debug("Loaded all plugins.");
bPluginsLoaded = 1;
}
#else
void unload_sqw_plugins()
{
}
......@@ -284,6 +291,7 @@ bool save_sqw_params(const SqwBase* pSqw,
return 1;
}
bool load_sqw_params(SqwBase* pSqw,
tl::Prop<std::string>& xml, const std::string& strXmlRoot)
{
......
......@@ -636,7 +636,7 @@ void ScanViewerDlg::CalcPol()
std::size_t iCnts = 0;
if(iPt < vecCnts.size())
iCnts = std::size_t(vecCnts[iPt]);
t_real dErr = (iCnts==0 ? 1 : std::sqrt(t_real{iCnts}));
t_real dErr = (iCnts==0 ? 1 : std::sqrt(t_real(iCnts)));
ostrCnts << "<tr><td>" << polvec_str(dPix, dPiy, dPiz) << "</td>"
<< "<td>" << polvec_str(dPfx, dPfy, dPfz) << "</td>"
......
......@@ -894,7 +894,6 @@ TazDlg::TazDlg(QWidget* pParent, const std::string& strLogFile)
TazDlg::~TazDlg()
{
//log_debug("In ", __func__, ".");
Disconnect();
DeleteDialogs();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment