diff --git a/GeoLib/CMakeLists.txt b/GeoLib/CMakeLists.txt index bde06ed7800074356a2e224f507f46abb4e93e50..5f68fd5c5e7caaf314be347670961e1cbe81a0d2 100644 --- a/GeoLib/CMakeLists.txt +++ b/GeoLib/CMakeLists.txt @@ -1,49 +1,8 @@ # Source files -SET ( GeoLib_Files - AxisAlignedBoundingBox.cpp - BruteForceClosestPair.cpp - Color.cpp - GEOObjects.cpp - GeoType.cpp - Point.cpp - PointVec.cpp - Polygon.cpp - Polyline.cpp -# ProjectData.cpp # uses CFEMesh class -# SimplePolygonTree.cpp # uses FileIO/MeshIO - Station.cpp - Surface.cpp - Triangle.cpp - Raster.cpp - AxisAlignedBoundingBox.h - BruteForceClosestPair.h - ClosestPair.h - Color.h - GeoObject.h - GEOObjects.h - GeoType.h - Point.h - PointVec.h - PointWithID.h - Polygon.h - Polyline.h - PolylineVec.h -# ProjectData.h # uses CFEMesh class - PropertyBounds.h - QuadTree.h -# SimplePolygonTree.h # uses FileIO/MeshIO - Station.h - Surface.h - SurfaceVec.h - TemplatePoint.h - TemplateVec.h - Triangle.h - Raster.h -) -SOURCE_GROUP(GeoLib FILES ${GeoLib_Files}) +GET_SOURCE_FILES(SOURCES_GEOLIB) # Create the library -ADD_LIBRARY(GeoLib STATIC ${GeoLib_Files}) +ADD_LIBRARY(GeoLib STATIC ${SOURCES_GEOLIB}) include_directories( @@ -53,8 +12,7 @@ include_directories( ) -target_link_libraries ( - GeoLib +target_link_libraries (GeoLib Base MathLib ) diff --git a/GeoLib/ProjectData.cpp b/GeoLib/ProjectData.cpp deleted file mode 100644 index d668fd46726fe7e7a47b207316b2689c28113143..0000000000000000000000000000000000000000 --- a/GeoLib/ProjectData.cpp +++ /dev/null @@ -1,148 +0,0 @@ -/** - * \file ProjectData.cpp - * 25/08/2010 KR Initial implementation - */ - -#include "ProjectData.h" -#include "StringTools.h" - - -ProjectData::ProjectData() -//: _geoObjects () -{} - -ProjectData::~ProjectData() -{ - delete _geoObjects; - for (std::map<std::string, MeshLib::CFEMesh*>::iterator it = _msh_vec.begin(); it != _msh_vec.end(); ++it) - { - delete it->second; - } - size_t nCond (_cond_vec.size()); - for (size_t i=0; i<nCond; i++) - { - delete _cond_vec[i]; - } -} - -void ProjectData::addMesh(MeshLib::CFEMesh* mesh, std::string &name) -{ - isUniqueMeshName(name); - _msh_vec[name] = mesh; -}; - -const MeshLib::CFEMesh* ProjectData::getMesh(const std::string &name) const -{ - return _msh_vec.find(name)->second; -} - -bool ProjectData::removeMesh(const std::string &name) -{ - delete _msh_vec[name]; - size_t result = _msh_vec.erase(name); - return (result>0); -} - -void ProjectData::addCondition(FEMCondition* cond) -{ - _cond_vec.push_back(cond); -}; - -void ProjectData::addConditions(std::vector<FEMCondition*> conds) -{ - for (size_t i=0; i<conds.size(); i++) - _cond_vec.push_back(conds[i]); -}; - -const FEMCondition* ProjectData::getCondition(const std::string &geo_name, GEOLIB::GEOTYPE type, const std::string &cond_name) const -{ - for (std::vector<FEMCondition*>::const_iterator it = _cond_vec.begin(); it != _cond_vec.end(); ++it) - { - if ((*it)->getAssociatedGeometryName().compare(geo_name) == 0) - { - if ( ((*it)->getGeoName().compare(cond_name)==0) && ((*it)->getGeoType()==type) ) - return *it; - } - } - std::cout << "Error in ProjectData::getCondition() - No condition found with name \"" << cond_name << "\"..." << std::endl; - return NULL; -} - -const std::vector<FEMCondition*> ProjectData::getConditions(const std::string &geo_name, FEMCondition::CondType type) const -{ - std::vector<FEMCondition*> conds; - for (std::vector<FEMCondition*>::const_iterator it = _cond_vec.begin(); it != _cond_vec.end(); ++it) - { - if ((*it)->getAssociatedGeometryName().compare(geo_name) == 0) - { - if ( (type == FEMCondition::UNSPECIFIED) || ((*it)->getCondType() == type) ) - conds.push_back(*it); - } - } - return conds; -} - -bool ProjectData::removeCondition(const std::string &geo_name, GEOLIB::GEOTYPE type, const std::string &cond_name) -{ - for (std::vector<FEMCondition*>::iterator it = _cond_vec.begin(); it != _cond_vec.end(); ++it) - { - if ((*it)->getAssociatedGeometryName().compare(geo_name) == 0) - { - if ( ((*it)->getGeoName().compare(cond_name)==0) && ((*it)->getGeoType()==type) ) - { - delete *it; - _cond_vec.erase(it); - return true; - } - } - } - std::cout << "Error in ProjectData::getCondition() - No condition found with name \"" << cond_name << "\"..." << std::endl; - return false; -} - -void ProjectData::removeConditions(const std::string &geo_name, FEMCondition::CondType type) -{ - for (std::vector<FEMCondition*>::iterator it = _cond_vec.begin(); it != _cond_vec.end();) - { - if ( ((*it)->getAssociatedGeometryName().compare(geo_name) == 0) - && ( (type == FEMCondition::UNSPECIFIED) || ((*it)->getCondType() == type) )) - { - delete *it; - it = _cond_vec.erase(it); - } - else ++it; - } -} - -bool ProjectData::isUniqueMeshName(std::string &name) -{ - int count(0); - bool isUnique(false); - std::string cpName; - - while (!isUnique) - { - isUnique = true; - cpName = name; - - count++; - // If the original name already exists we start to add numbers to name for - // as long as it takes to make the name unique. - if (count>1) cpName = cpName + "-" + number2str(count); - - for (std::map<std::string, MeshLib::CFEMesh*>::iterator it = _msh_vec.begin(); it != _msh_vec.end(); ++it) - { - if ( cpName.compare(it->first) == 0 ) isUnique = false; - } - } - - // At this point cpName is a unique name and isUnique is true. - // If cpName is not the original name, "name" is changed and isUnique is set to false, - // indicating that a vector with the original name already exists. - if (count>1) - { - isUnique = false; - name = cpName; - } - return isUnique; -} diff --git a/GeoLib/ProjectData.h b/GeoLib/ProjectData.h deleted file mode 100644 index f3887909200f6ca320836a75266be93538602e6b..0000000000000000000000000000000000000000 --- a/GeoLib/ProjectData.h +++ /dev/null @@ -1,75 +0,0 @@ -/** - * \file ProjectData.h - * 25/08/2010 KR Initial implementation - */ - -#ifndef PROJECTDATA_H_ -#define PROJECTDATA_H_ - -#include "GEOObjects.h" -#include "msh_mesh.h" -#include "FEMCondition.h" - - -/** - * The ProjectData Object contains all the data needed for a certain project, i.e. all - * geometric data (stored in a GEOObjects-object), all the meshes, FEM Conditions (i.e. - * Boundary Conditions, Source Terms and Initial Conditions), etc. - * ProjectData does not administrate any of the objects, it is just a "container class" - * to store them all in one place. - * For each class of object stored in this container exists an add-, get- and remove-method. - * - * \sa GEOModels, FEMCondition - */ -class ProjectData -{ -public: - ProjectData(); - virtual ~ProjectData(); - - // Returns the GEOObjects containing all points, polylines and surfaces - GEOLIB::GEOObjects* getGEOObjects() { return _geoObjects; }; - - // Returns the GEOObjects containing all points, polylines and surfaces - void setGEOObjects(GEOLIB::GEOObjects* geo_objects) { _geoObjects = geo_objects; }; - - /// Adds a new mesh - virtual void addMesh(MeshLib::CFEMesh* mesh, std::string &name); - - /// Returns the mesh with the given name. - const MeshLib::CFEMesh* getMesh(const std::string &name) const; - - /// Returns all the meshes with their respective names - const std::map<std::string, MeshLib::CFEMesh*>& getMeshObjects() const { return _msh_vec; }; - - /// Removes the mesh with the given name. - virtual bool removeMesh(const std::string &name); - - /// Adds a new FEM Condition - virtual void addCondition(FEMCondition* cond); - - /// Adds a new FEM Condition - virtual void addConditions(std::vector<FEMCondition*> conds); - - /// Returns the FEM Condition set on a GeoObject with the given name and type from a certain geometry. - const FEMCondition* getCondition(const std::string &geo_name, GEOLIB::GEOTYPE type, const std::string &cond_name) const; - - /// Returns all FEM Conditions with the given type from a certain geometry. - const std::vector<FEMCondition*> getConditions(const std::string &geo_name, FEMCondition::CondType type = FEMCondition::UNSPECIFIED) const; - - /// Removes the FEM Condition set on a GeoObject with the given name and type from a certain geometry. - virtual bool removeCondition(const std::string &geo_name, GEOLIB::GEOTYPE type, const std::string &cond_name); - - /// Removes all FEM Conditions with the given type from a certain geometry - virtual void removeConditions(const std::string &geo_name, FEMCondition::CondType type = FEMCondition::UNSPECIFIED); - - /// Checks if the name of the mesh is already exists, if so it generates a unique name. - bool isUniqueMeshName(std::string &name); - -private: - GEOLIB::GEOObjects* _geoObjects; - std::map<std::string, MeshLib::CFEMesh*> _msh_vec; - std::vector<FEMCondition*> _cond_vec; -}; - -#endif //PROJECTDATA_H_ diff --git a/GeoLib/SimplePolygonTree.h b/GeoLib/SimplePolygonTree.h index 688364df5f75f1753d988cdb7370a95ae20f2c35..44c500fc65723af75c6169ae2753f3183f569dcf 100644 --- a/GeoLib/SimplePolygonTree.h +++ b/GeoLib/SimplePolygonTree.h @@ -10,7 +10,6 @@ #include "Polygon.h" // FileIO -#include "MeshIO/GMSHInterface.h" namespace GEOLIB { diff --git a/MathLib/CMakeLists.txt b/MathLib/CMakeLists.txt index 37b96ef97ff28a4729f247746dfe664988f16d36..6eb716e444f5e716fe3a6d81b55495a58e326be4 100644 --- a/MathLib/CMakeLists.txt +++ b/MathLib/CMakeLists.txt @@ -1,89 +1,26 @@ #Source files grouped by a directory -SET ( MathLib_Files - AnalyticalGeometry.h - LinearInterpolation.h - MathTools.h - Vector3.h - EarClippingTriangulation.h - max.h - sparse.h - vector_io.h - AnalyticalGeometry.cpp - LinearInterpolation.cpp - MathTools.cpp - EarClippingTriangulation.cpp -) -SOURCE_GROUP( MathLib FILES ${MathLib_Files}) -SET ( SOURCES ${SOURCES} ${MathLib_Files}) - -SET ( MathLib_LinAlg_Files - LinAlg/MatrixBase.h - LinAlg/VectorNorms.h -) -SOURCE_GROUP( MathLib\\LinAlg FILES ${MathLib_LinAlg_Files}) -SET ( SOURCES ${SOURCES} ${MathLib_LinAlg_Files}) +GET_SOURCE_FILES(SOURCES_MATHLIB) +SET ( SOURCES ${SOURCES_MATHLIB}) -SET ( MathLib_LinAlg_Dense_Files - LinAlg/Dense/Matrix.h -) -SOURCE_GROUP( MathLib\\LinAlg\\Dense FILES ${MathLib_LinAlg_Dense_Files}) -SET ( SOURCES ${SOURCES} ${MathLib_LinAlg_Dense_Files}) +GET_SOURCE_FILES(SOURCES_LINALG LinAlg) +SET ( SOURCES ${SOURCES} ${SOURCES_LINALG}) -SET ( MathLib_LinAlg_Sparse_Files - LinAlg/Sparse/amuxCRS.h - LinAlg/Sparse/CRSMatrix.h - LinAlg/Sparse/CRSMatrixPThreads.h - LinAlg/Sparse/CRSMatrixOpenMP.h - LinAlg/Sparse/CRSSymMatrix.h - LinAlg/Sparse/SparseMatrixBase.h - LinAlg/Sparse/amuxCRS.cpp -) -SOURCE_GROUP( MathLib\\LinAlg\\Sparse FILES ${MathLib_LinAlg_Sparse_Files}) -SET ( SOURCES ${SOURCES} ${MathLib_LinAlg_Sparse_Files}) +GET_SOURCE_FILES(SOURCES_LINALG_DENSE LinAlg/Dense) +SET ( SOURCES ${SOURCES} ${SOURCES_LINALG_DENSE}) -SET ( MathLib_LinAlg_Solvers_Files - LinAlg/Solvers/LinearSolver.h - LinAlg/Solvers/DirectLinearSolver.h - LinAlg/Solvers/DenseDirectLinearSolver.h - LinAlg/Solvers/GaussAlgorithm.h - LinAlg/Solvers/TriangularSolve.h - LinAlg/Solvers/IterativeLinearSolver.h - LinAlg/Solvers/solver.h - LinAlg/Solvers/BiCGStab.h - LinAlg/Solvers/CG.h - LinAlg/Solvers/GMRes.h - LinAlg/Solvers/BiCGStab.cpp - LinAlg/Solvers/CG.cpp - LinAlg/Solvers/CGParallel.cpp - LinAlg/Solvers/GMRes.cpp - LinAlg/Solvers/GaussAlgorithm.cpp - LinAlg/Solvers/TriangularSolve.cpp -) -SOURCE_GROUP( MathLib\\LinAlg\\Solvers FILES ${MathLib_LinAlg_Solvers_Files}) -SET ( SOURCES ${SOURCES} ${MathLib_LinAlg_Solvers_Files}) +GET_SOURCE_FILES(SOURCES_LINALG_SPARSE LinAlg/Sparse) +SET ( SOURCES ${SOURCES} ${SOURCES_LINALG_SPARSE}) -SET ( MathLib_LinAlg_Preconditioner_Files - LinAlg/Preconditioner/generateDiagPrecond.h - LinAlg/Preconditioner/generateDiagPrecond.cpp -) -SOURCE_GROUP( MathLib\\LinAlg\\Preconditioner FILES ${MathLib_LinAlg_Preconditioner_Files}) -SET ( SOURCES ${SOURCES} ${MathLib_LinAlg_Preconditioner_Files}) +GET_SOURCE_FILES(SOURCES_LINALG_SOLVERS LinAlg/Solvers) +SET ( SOURCES ${SOURCES} ${SOURCES_LINALG_SOLVERS}) -IF (METIS_FOUND) - FILE(GLOB MathLib_LinAlg_Sparse_NestedDissectionPermutation_HEADERS - LinAlg/Sparse/NestedDissectionPermutation/*.h) +GET_SOURCE_FILES(SOURCES_LINALG_PRECOND LinAlg/Preconditioner) +SET ( SOURCES ${SOURCES} ${SOURCES_LINALG_PRECOND}) - FILE(GLOB MathLib_LinAlg_Sparse_NestedDissectionPermutation_SOURCES - LinAlg/Sparse/NestedDissectionPermutation/*.cpp) - SOURCE_GROUP( MathLib\\LinAlg\\Sparse\\NestedDissectionPermutation FILES - ${MathLib_LinAlg_Sparse_NestedDissectionPermutation_HEADERS} - ${MathLib_LinAlg_Sparse_NestedDissectionPermutation_SOURCES} - ) - SET (SOURCES ${SOURCES} - ${MathLib_LinAlg_Sparse_NestedDissectionPermutation_HEADERS} - ${MathLib_LinAlg_Sparse_NestedDissectionPermutation_SOURCES} - ) +IF (METIS_FOUND) + GET_SOURCE_FILES(SOURCES_LINALG_SPARSE_NESTEDDISSECTION LinAlg/Sparse/NestedDissectionPermutation) + SET ( SOURCES ${SOURCES} ${SOURCES_LINALG_SPARSE_NESTEDDISSECTION}) ENDIF () INCLUDE_DIRECTORIES ( @@ -99,9 +36,7 @@ IF(METIS_FOUND) ENDIF() # Create the library -ADD_LIBRARY( MathLib STATIC - ${SOURCES} -) +ADD_LIBRARY( MathLib STATIC ${SOURCES} ) SET_TARGET_PROPERTIES(MathLib PROPERTIES LINKER_LANGUAGE CXX) diff --git a/scripts/cmake/Functions.cmake b/scripts/cmake/Functions.cmake index 1a88d30f43efe903c9603be03593ab99461e37d1..9a61a5f6674ccb78f4b8c699ee0fcb3f9c775f45 100644 --- a/scripts/cmake/Functions.cmake +++ b/scripts/cmake/Functions.cmake @@ -5,23 +5,32 @@ MACRO(GET_CURRENT_SOURCE_SUBDIRECTORY CURRENT_SOURCE_SUBDIRECTORY) ENDMACRO() # Returns a list of source files (*.h and *.cpp) in SOURCE_FILES and creates a Visual -# Studio folder. A (relative) directory can be passed as second parameter (optional). +# Studio folder. A (relative) subdirectory can be passed as second parameter (optional). MACRO(GET_SOURCE_FILES SOURCE_FILES) - IF(ARGC EQUAL 2) - SET(DIR "${arg2}/") + IF(${ARGC} EQUAL 2) + SET(DIR "${ARGV1}") ELSE() - SET(DIR "") + SET(DIR ".") ENDIF() # Get all files in the directory - FILE(GLOB GET_SOURCE_FILES_HEADERS ${DIR}*.h) - FILE(GLOB GET_SOURCE_FILES_SOURCES ${DIR}*.cpp) + FILE(GLOB GET_SOURCE_FILES_HEADERS ${DIR}/*.h) + FILE(GLOB GET_SOURCE_FILES_SOURCES ${DIR}/*.cpp) SET(${SOURCE_FILES} ${GET_SOURCE_FILES_HEADERS} ${GET_SOURCE_FILES_SOURCES}) + + # Adapt DIR var to backslash syntax of SOURCE_GROUP cmd + IF(${ARGC} EQUAL 2) + STRING(REPLACE "/" "\\\\" DIR ${DIR}) + SET(DIR "\\${DIR}") + ELSE() + SET(DIR "") + ENDIF() GET_CURRENT_SOURCE_SUBDIRECTORY(DIRECTORY) - MESSAGE("Curr: ${DIRECTORY}") - SOURCE_GROUP( ${DIRECTORY} FILES ${SOURCE_FILES}) + SOURCE_GROUP( "${DIRECTORY}${DIR}" FILES + ${GET_SOURCE_FILES_HEADERS} + ${GET_SOURCE_FILES_SOURCES}) ENDMACRO() \ No newline at end of file diff --git a/scripts/cmake/cmake/CodeCoverage.cmake b/scripts/cmake/cmake/CodeCoverage.cmake new file mode 100644 index 0000000000000000000000000000000000000000..4fe002368b74343e850159954827f5ec225e52b0 --- /dev/null +++ b/scripts/cmake/cmake/CodeCoverage.cmake @@ -0,0 +1,78 @@ +# - Enable Code Coverage +# +# 2012-01-31, Lars Bilke +# +# USAGE: +# 1. Copy this file into your cmake modules path +# 2. Add the following line to your CMakeLists.txt: +# INCLUDE(CodeCoverage) +# +# 3. Use the function SETUP_TARGET_FOR_COVERAGE to create a custom make target +# which runs your test executable and produces a lcov code coverage report. +# + +# Check prereqs +FIND_PROGRAM( GCOV_PATH gcov ) +FIND_PROGRAM( LCOV_PATH lcov ) +FIND_PROGRAM( GENHTML_PATH genhtml ) + +IF(NOT GCOV_PATH) + MESSAGE(FATAL_ERROR "gcov not found! Aborting...") +ENDIF() # NOT GCOV_PATH + +IF(NOT LCOV_PATH) + MESSAGE(FATAL_ERROR "lcov not found! Aborting...") +ENDIF() # NOT LCOV_PATH + +IF(NOT GENHTML_PATH) + MESSAGE(FATAL_ERROR "genhtml not found! Aborting...") +ENDIF() # NOT GENHTML_PATH + +IF(NOT CMAKE_COMPILER_IS_GNUCXX) + MESSAGE(FATAL_ERROR "Compiler is not GNU gcc! Aborting...") +ENDIF() # NOT CMAKE_COMPILER_IS_GNUCXX + +IF ( NOT CMAKE_BUILD_TYPE STREQUAL "Debug" ) + MESSAGE( WARNING "Code coverage results with an optimised (non-Debug) build may be misleading" ) +ENDIF() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug" + + +# Setup compiler options +ADD_DEFINITIONS(-fprofile-arcs -ftest-coverage) +LINK_LIBRARIES(gcov) + + +# Param _targetname The name of new the custom make target +# Param _testrunner The name of the target which runs the tests +# Param _outputname lcov output is generated as _outputname.info +# HTML report is generated in _outputname/index.html +FUNCTION(SETUP_TARGET_FOR_COVERAGE _targetname _testrunnerexe _outputname) + + # Setup target + ADD_CUSTOM_TARGET(${_targetname} + + # Cleanup lcov + lcov --directory . --zerocounters + + # Run tests + COMMAND ${_testrunner} + + # Capturing lcov counters and generating report + COMMAND lcov --directory . --capture --output-file ${_outputname}.info + COMMAND lcov --remove ${_outputname}.info 'tests/*' '/usr/*' --output-file ${_outputname}.info.cleaned + COMMAND genhtml -o ${_outputname} ${_outputname}.info.cleaned + COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info ${_outputname}.info.cleaned + + DEPENDS ${_testrunner} + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + COMMENT "Resetting code coverage counters to zero.\n + Processing code coverage counters and generating report." + ) + + # Show info where to find the report + ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD + COMMAND ; + COMMENT "Open ./${_outputname}/index.html in your browser to view the coverage report." + ) + +ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE diff --git a/scripts/cmake/cmake/FindMSVCRedist.cmake b/scripts/cmake/cmake/FindMSVCRedist.cmake index 099defc8f1372fb85ee33fdc9466a67eb1f132bf..50cb6814c2a4ce558720800677d245c3137c07b1 100644 --- a/scripts/cmake/cmake/FindMSVCRedist.cmake +++ b/scripts/cmake/cmake/FindMSVCRedist.cmake @@ -5,6 +5,9 @@ IF (MSVC) if (MSVC90) set(VCVERS 9) endif() + if (MSVC10) + set(VCVERS 10) + endif() IF(CMAKE_CL_64) #IF(MSVC_VERSION GREATER 1599) @@ -23,19 +26,23 @@ IF (MSVC) set(SDKVERS "2.0") endif() if(${VCVERS} EQUAL 9) - set(SDKVERS "3.5") + set(SDKVERS "v6.0A") + endif() + if(${VCVERS} EQUAL 10) + set(SDKVERS "v7.0A") endif() - IF(MSVC${VCVERS}0) + IF(MSVC${VCVERS}0 OR MSVC${VCVERS}) FIND_PROGRAM(MSVC_REDIST NAMES vcredist_${CMAKE_MSVC_ARCH}/vcredist_${CMAKE_MSVC_ARCH}.exe PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\${VCVERS}.0;InstallDir]/../../SDK/v${SDKVERS}/BootStrapper/Packages/" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${VCVERS}.0;InstallDir]/../../SDK/v${SDKVERS}/BootStrapper/Packages/" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\VisualStudio\\${VCVERS}.0;InstallDir]/../../SDK/v${SDKVERS}/BootStrapper/Packages/" +"C:/Program Files (x86)/Microsoft SDKs/Windows/${SDKVERS}/Bootstrapper/Packages/" ) GET_FILENAME_COMPONENT(vcredist_name "${MSVC_REDIST}" NAME) INSTALL(PROGRAMS ${MSVC_REDIST} COMPONENT msvc_redist DESTINATION bin) SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "ExecWait '\\\"$INSTDIR\\\\bin\\\\${vcredist_name}\\\"'") message(STATUS "MSVC_REDIST: ${MSVC_REDIST}") - ENDIF(MSVC${VCVERS}0) + ENDIF(MSVC${VCVERS}0 OR MSVC${VCVERS}) ENDIF () \ No newline at end of file diff --git a/scripts/cmake/cmake/OptionRequires.cmake b/scripts/cmake/cmake/OptionRequires.cmake index 5505664d135a52eb1ae48ea2da4b82a60d573168..dafbf376a04b1782fd60c69d2f048f009c8fa040 100644 --- a/scripts/cmake/cmake/OptionRequires.cmake +++ b/scripts/cmake/cmake/OptionRequires.cmake @@ -15,7 +15,7 @@ function(option_requires name desc) set(args ${ARGN}) - set(OFF_BY_DEFAULT false) + set(OFF_BY_DEFAULT true) list(FIND args "OFF_BY_DEFAULT" _off_found) if(NOT _off_found EQUAL -1) list(REMOVE_AT args ${_off_found})