Skip to content
Snippets Groups Projects
Commit 3b5bd005 authored by Pospelov, Gennady's avatar Pospelov, Gennady
Browse files

winbuild: fix of mingw build in debug mode

parent 9042e41b
No related branches found
No related tags found
No related merge requests found
...@@ -3,8 +3,8 @@ TEMPLATE = subdirs ...@@ -3,8 +3,8 @@ TEMPLATE = subdirs
include($$PWD/shared.pri) include($$PWD/shared.pri)
SUBDIRS += Core SUBDIRS += Core
#SUBDIRS += ThirdParty/gtest SUBDIRS += ThirdParty/gtest
#SUBDIRS += Tests/UnitTests/TestCore SUBDIRS += Tests/UnitTests/TestCore
SUBDIRS += Tests/FunctionalTests/TestCore SUBDIRS += Tests/FunctionalTests/TestCore
SUBDIRS += ThirdParty/RootMinimizers SUBDIRS += ThirdParty/RootMinimizers
SUBDIRS += Fit SUBDIRS += Fit
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
//! An homogeneous material with magnetization //! An homogeneous material with magnetization
class HomogeneousMagneticMaterial : public HomogeneousMaterial class BA_CORE_API_ HomogeneousMagneticMaterial : public HomogeneousMaterial
{ {
public: public:
//! Constructs a material with _name_, _refractive_index_ and //! Constructs a material with _name_, _refractive_index_ and
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
//! A homogeneous material with a refractive index. //! A homogeneous material with a refractive index.
class HomogeneousMaterial : public IMaterial class BA_CORE_API_ HomogeneousMaterial : public IMaterial
{ {
public: public:
//! Constructs a material with _name_ and _refractive_index_. //! Constructs a material with _name_ and _refractive_index_.
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
//! Interface to a named material. //! Interface to a named material.
class IMaterial : public INamed class BA_CORE_API_ IMaterial : public INamed
{ {
public: public:
//! Constructor that sets _name_. //! Constructor that sets _name_.
......
...@@ -42,11 +42,14 @@ set(${library_name}_LIBRARY_TYPE SHARED) ...@@ -42,11 +42,14 @@ set(${library_name}_LIBRARY_TYPE SHARED)
# dependencies # dependencies
include_directories(${BornAgainCore_INCLUDE_DIRS}) include_directories(${BornAgainCore_INCLUDE_DIRS})
target_link_libraries(${library_name} ${BornAgainCore_LIBRARY}) target_link_libraries(${library_name} ${BornAgainCore_LIBRARY})
target_link_libraries(${library_name} ${GSL_LIBRARIES})
message("XXX ${GSL_LIBRARIES}")
include_directories(${RootMinimizers_INCLUDE_DIRS}) include_directories(${RootMinimizers_INCLUDE_DIRS})
target_link_libraries(${library_name} ${RootMinimizers_LIBRARY}) target_link_libraries(${library_name} ${RootMinimizers_LIBRARY})
include_directories(${Boost_INCLUDE_DIRS}) include_directories(${Boost_INCLUDE_DIRS})
target_link_libraries(${library_name} ${Boost_LIBRARIES}) target_link_libraries(${library_name} ${Boost_LIBRARIES})
# python in windows required .yd extention for the library name # python in windows required .yd extention for the library name
if(WIN32 AND BORNAGAIN_PYTHON) if(WIN32 AND BORNAGAIN_PYTHON)
ADD_CUSTOM_COMMAND( ADD_CUSTOM_COMMAND(
......
...@@ -7,8 +7,8 @@ set(BORNAGAIN_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) ...@@ -7,8 +7,8 @@ set(BORNAGAIN_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${BORNAGAIN_RUNTIME_OUTPUT_DIRECTORY}) execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${BORNAGAIN_RUNTIME_OUTPUT_DIRECTORY})
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${BORNAGAIN_RUNTIME_OUTPUT_DIRECTORY}) set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${BORNAGAIN_RUNTIME_OUTPUT_DIRECTORY})
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${BORNAGAIN_RUNTIME_OUTPUT_DIRECTORY}) set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${BORNAGAIN_RUNTIME_OUTPUT_DIRECTORY})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${BORNAGAIN_RUNTIME_OUTPUT_DIRECTORY}) # for msvc set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${BORNAGAIN_RUNTIME_OUTPUT_DIRECTORY})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${BORNAGAIN_RUNTIME_OUTPUT_DIRECTORY}) # for msvc set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${BORNAGAIN_RUNTIME_OUTPUT_DIRECTORY})
if(WIN32) if(WIN32)
set(ssuffix .bat) set(ssuffix .bat)
......
...@@ -30,10 +30,21 @@ if( WIN32 AND NOT CYGWIN AND NOT MSYS ) ...@@ -30,10 +30,21 @@ if( WIN32 AND NOT CYGWIN AND NOT MSYS )
"C:/opt/local/include" "C:/opt/local/include"
) )
# message("XXXXX ${GSL_INCLUDE_DIR}") # message("XXXXX ${GSL_INCLUDE_DIR}")
if(MSVC)
set(gsl_library_name gsl)
set(gslcblas_library_name cblas)
else()
set(gsl_library_name libgsl-0)
set(gslcblas_library_name libgslcblas-0)
endif()
if( GSL_INCLUDE_DIR ) if( GSL_INCLUDE_DIR )
# look for gsl library # look for gsl library
find_library( GSL_LIBRARY find_library( GSL_LIBRARY
NAMES gsl libgsl NAMES ${gsl_library_name}
PATHS PATHS
#$ENV{GSL_DIR}/lib #$ENV{GSL_DIR}/lib
"C:/opt/local/lib" "C:/opt/local/lib"
...@@ -47,7 +58,7 @@ if( WIN32 AND NOT CYGWIN AND NOT MSYS ) ...@@ -47,7 +58,7 @@ if( WIN32 AND NOT CYGWIN AND NOT MSYS )
# look for gsl cblas library # look for gsl cblas library
find_library( GSL_CBLAS_LIBRARY find_library( GSL_CBLAS_LIBRARY
NAMES gslcblas libgslcblas NAMES ${gslcblas_library_name}
PATHS $ENV{GSL_DIR}/lib PATHS $ENV{GSL_DIR}/lib
"C:/opt/local/lib" "C:/opt/local/lib"
) )
......
...@@ -73,7 +73,13 @@ isEmpty(GSL_INCLUDE): message("Can't find" $${GSL_HEADERFILE} "in" $${GSL_HEADER ...@@ -73,7 +73,13 @@ isEmpty(GSL_INCLUDE): message("Can't find" $${GSL_HEADERFILE} "in" $${GSL_HEADER
GSL_LIB = $$replace(GSL_INCLUDE,"include","lib") GSL_LIB = $$replace(GSL_INCLUDE,"include","lib")
INCLUDEPATH *= $${GSL_INCLUDE} INCLUDEPATH *= $${GSL_INCLUDE}
LIBS *= -L$${GSL_LIB} LIBS *= -L$${GSL_LIB}
macx|unix {
LIBS += -lgsl -lgslcblas LIBS += -lgsl -lgslcblas
}
win32 {
LIBS += -lgsl-0 -lgslcblas-0
}
# --- checking eigen headers --- # --- checking eigen headers ---
EIGEN_HEADERFILE = Eigen/Core EIGEN_HEADERFILE = Eigen/Core
...@@ -182,7 +188,7 @@ DEPENDPATH += $$BornAgainCore_INCLUDEPATH ...@@ -182,7 +188,7 @@ DEPENDPATH += $$BornAgainCore_INCLUDEPATH
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# compiler options for debug and release # compiler options for debug and release
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
QMAKE_CXXFLAGS += -std=c++98 #QMAKE_CXXFLAGS += -std=c++98
# optimization flag used in release builds (the -O2 is the default used by qmake) # optimization flag used in release builds (the -O2 is the default used by qmake)
QMAKE_CXXFLAGS_DEBUG += -fdiagnostics-show-option # to find out in gcc which option control warning QMAKE_CXXFLAGS_DEBUG += -fdiagnostics-show-option # to find out in gcc which option control warning
...@@ -196,7 +202,7 @@ QMAKE_CXXFLAGS_DEBUG += -fdiagnostics-show-option # to find out in gcc which opt ...@@ -196,7 +202,7 @@ QMAKE_CXXFLAGS_DEBUG += -fdiagnostics-show-option # to find out in gcc which opt
# Eigen alighnment under windows, warnings from boost # Eigen alighnment under windows, warnings from boost
win32{ win32{
QMAKE_CXXFLAGS += -mincoming-stack-boundary=2 -Wno-unused-local-typedefs -Wno-attributes -Wno-unknown-pragmas QMAKE_CXXFLAGS += -DEIGEN_DONT_ALIGN_STATICALLY=1 -mincoming-stack-boundary=2 -Wno-unused-local-typedefs -Wno-attributes -Wno-unknown-pragmas
# QMAKE_CXXFLAGS += -D_MSC_VER=1301 # QMAKE_CXXFLAGS += -D_MSC_VER=1301
# QMAKE_CXXFLAGS += -DTYPENAME=typename # QMAKE_CXXFLAGS += -DTYPENAME=typename
} }
......
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