Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various windows build issues #9641

Merged
merged 6 commits into from
Sep 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cmake/tribits/core/package_arch/TribitsConstants.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ set(${PROJECT_NAME}_PACKAGE_DEPS_FILES_DIR "cmake/dependencies")

# Other stuff

if(WIN32)
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
#Apparently FIND_PROGRAM looks for an exact match of the file name.
#So even though "git clone ..." is valid to use on windows we need to give the
#full name of the command we want to run.
set(GIT_NAME git.cmd)
else(WIN32)
set(GIT_NAME git)
endif(WIN32)
SET(GIT_NAME git.cmd)
else()
SET(GIT_NAME git)
endif()
4 changes: 2 additions & 2 deletions packages/epetra/src/Epetra_C_wrappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ typedef long long * EPETRA_LONG_LONG;

#ifdef EPETRA_ADDRESS64BIT

typedef long int EPETRA_OBJECT_PTR;
typedef long int & EPETRA_OBJECT_REF;
typedef long long int EPETRA_OBJECT_PTR;
typedef long long int & EPETRA_OBJECT_REF;

#else

Expand Down
12 changes: 8 additions & 4 deletions packages/epetra/src/Epetra_Import_Util.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ namespace Epetra_Import_Util {

\warning This method is intended for expert developer use only, and should never be called by user code.
*/
int PackAndPrepareWithOwningPIDs(const Epetra_CrsMatrix & SourceMatrix,
int EPETRA_LIB_DLL_EXPORT PackAndPrepareWithOwningPIDs(
const Epetra_CrsMatrix & SourceMatrix,
int NumExportIDs,
int * ExportLIDs,
int & LenExports,
Expand All @@ -83,7 +84,8 @@ int PackAndPrepareWithOwningPIDs(const Epetra_CrsMatrix & SourceMatrix,

\warning This method is intended for expert developer use only, and should never be called by user code.
*/
int UnpackWithOwningPIDsCount(const Epetra_CrsMatrix& SourceMatrix,
int EPETRA_LIB_DLL_EXPORT UnpackWithOwningPIDsCount(
const Epetra_CrsMatrix& SourceMatrix,
int NumSameIDs,
int NumRemoteIDs,
const int * RemoteLIDs,
Expand All @@ -105,7 +107,8 @@ int UnpackWithOwningPIDsCount(const Epetra_CrsMatrix& SourceMatrix,

\warning This method is intended for expert developer use only, and should never be called by user code.
*/
int UnpackAndCombineIntoCrsArrays(const Epetra_CrsMatrix& SourceMatrix,
int EPETRA_LIB_DLL_EXPORT UnpackAndCombineIntoCrsArrays(
const Epetra_CrsMatrix& SourceMatrix,
int NumSameIDs,
int NumRemoteIDs,
const int * RemoteLIDs,
Expand Down Expand Up @@ -134,7 +137,8 @@ int UnpackAndCombineIntoCrsArrays(const Epetra_CrsMatrix& SourceMatrix,

\warning This method is intended for expert developer use only, and should never be called by user code.
*/
int UnpackAndCombineIntoCrsArrays(const Epetra_CrsMatrix& SourceMatrix,
int EPETRA_LIB_DLL_EXPORT UnpackAndCombineIntoCrsArrays(
const Epetra_CrsMatrix& SourceMatrix,
int NumSameIDs,
int NumRemoteIDs,
const int * RemoteLIDs,
Expand Down
2 changes: 1 addition & 1 deletion packages/epetra/src/Epetra_LinearProblemRedistor.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class Epetra_RowMatrixTransposer;

*/

class Epetra_LinearProblemRedistor {
class EPETRA_LIB_DLL_EXPORT Epetra_LinearProblemRedistor {

public:

Expand Down
2 changes: 1 addition & 1 deletion packages/epetra/src/Epetra_SerialDenseSVD.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Examples using Epetra_SerialDenseSVD can be found in the Epetra test directories
*/

//=========================================================================
class Epetra_SerialDenseSVD : public virtual Epetra_SerialDenseOperator, public Epetra_CompObject, public virtual Epetra_Object, public Epetra_BLAS, public Epetra_LAPACK{
class EPETRA_LIB_DLL_EXPORT Epetra_SerialDenseSVD : public virtual Epetra_SerialDenseOperator, public Epetra_CompObject, public virtual Epetra_Object, public Epetra_BLAS, public Epetra_LAPACK{
public:

//! @name Constructor/Destructor Methods
Expand Down
5 changes: 3 additions & 2 deletions packages/epetra/src/Epetra_Util.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class EPETRA_LIB_DLL_EXPORT Epetra_Util {

*/
template<typename T>
static void Sort(bool SortAscending, int NumKeys, T * Keys,
static void EPETRA_LIB_DLL_EXPORT Sort(bool SortAscending, int NumKeys, T * Keys,
int NumDoubleCompanions,double ** DoubleCompanions,
int NumIntCompanions, int ** IntCompanions,
int NumLongLongCompanions, long long ** LongLongCompanions);
Expand Down Expand Up @@ -467,7 +467,8 @@ const T* Epetra_Util_data_ptr(const std::vector<T> &vec)
\param lhs (Out) Fortran-style 2D array of LHS values.
\param ldrhs (Out) Stride between columns of lhs.
*/
int Epetra_Util_ExtractHbData(Epetra_CrsMatrix * A, Epetra_MultiVector * LHS,
int EPETRA_LIB_DLL_EXPORT Epetra_Util_ExtractHbData(
Epetra_CrsMatrix * A, Epetra_MultiVector * LHS,
Epetra_MultiVector * RHS,
int & M, int & N, int & nz, int * & ptr,
int * & ind, double * & val, int & Nrhs,
Expand Down
2 changes: 1 addition & 1 deletion packages/ifpack/src/Ifpack_SerialTriDiMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ method in the Epetra_CompObject base class.


//=========================================================================
class EPETRA_LIB_DLL_EXPORT Ifpack_SerialTriDiMatrix : public Epetra_CompObject, public Epetra_Object, public Epetra_BLAS {
class Ifpack_SerialTriDiMatrix : public Epetra_CompObject, public Epetra_Object, public Epetra_BLAS {

public:

Expand Down
2 changes: 1 addition & 1 deletion packages/ifpack/src/Ifpack_SerialTriDiSolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Examples using Ifpack_SerialTriDiSolver can be found in the Epetra test director
*/

//=========================================================================
class EPETRA_LIB_DLL_EXPORT Ifpack_SerialTriDiSolver :
class Ifpack_SerialTriDiSolver :
public Epetra_CompObject, public Epetra_BLAS,
public Epetra_Object {
public:
Expand Down
8 changes: 4 additions & 4 deletions packages/teuchos/numerics/src/Teuchos_BLAS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ namespace Teuchos {
//resolving them when linking dlls.
#ifdef _MSC_VER
# ifdef HAVE_TEUCHOS_COMPLEX
template BLAS<long int, std::complex<float> >;
template BLAS<long int, std::complex<double> >;
template class BLAS<long int, std::complex<float> >;
template class BLAS<long int, std::complex<double> >;
# endif
template BLAS<long int, float>;
template BLAS<long int, double>;
template class BLAS<long int, float>;
template class BLAS<long int, double>;
Comment on lines +116 to +120
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is inside of an ifdef for _MSC_VER so Trilinos PR testing will not test these changes. But this looks like correct C++ code (and I am surprised that it compiled the way it was).

#endif

// *************************** BLAS<int,float> DEFINITIONS ******************************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ namespace Teuchos {
* using the non-virtual protected members <tt>setMyParamList()</tt> and
* <tt>getMyParamList()</tt>.
*/
class ParameterListAcceptorDefaultBase : virtual public ParameterListAcceptor {
class TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT ParameterListAcceptorDefaultBase : virtual public ParameterListAcceptor {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, we are just adding an export. I can't see how this can break an existing windows build.

public:

/** \name Overridden from ParameterListAcceptor */
Expand Down