diff --git a/CHANGELOG b/CHANGELOG index 49dde18232..7f4b2d5982 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -75,6 +75,7 @@ Build system ### Cmake +- A file cmake.log containing the changed options is written to the cmake build directory. - removed replacement of the settings of RelWithDebInfo diff --git a/CMakeLists.txt b/CMakeLists.txt index 05d0865006..9a262002c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -807,3 +807,161 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) include(FeatureSummary) feature_summary(WHAT ALL) endif() + +# -------------------------------------------------------------- +# write log file of non-default parameter settings +file(WRITE ${CMAKE_BINARY_DIR}/cmake.log "") +if(AUTOBUILD) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log "-DAUTOBUILD=on") +endif() +if(NOT SHARED) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DSHARED=off") +endif() +if(NOT ZLIB) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DZLIB=off") +endif() +if(NOT READLINE) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DREADLINE=off") +endif() +if(NOT GMP) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DGMP=off") +endif() +if(STATIC_GMP) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DSTATIC_GMP=on") +endif() +if(NOT PAPILO) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DPAPILO=off") +else() + if(PAPILO_DIR) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DPAPILO_DIR=${PAPILO_DIR}") + endif() +endif() +if(NOT ZIMPL) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DZIMPL=off") +else() + if(ZIMPL_DIR) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DZIMPL_DIR=${ZIMPL_DIR}") + endif() +endif() +if(NOT AMPL) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DAMPL=off") +endif() +if(NOT IPOPT) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DIPOPT=off") +else() + if(IPOPT_DIR) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DIPOPT_DIR=${IPOPT_DIR}") + endif() +endif() +if(LAPACK) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DLAPACK=on") +endif() +if(WORHP) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DWORHP=on") + if(WORHP_DIR) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DWORHP_DIR=${WORHP_DIR}") + endif() +endif() +if(PARASCIP) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DPARASCIP=on") +endif() +if(NOT THREADSAFE) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DTHREADSAFE=off") +endif() +if(LPSCHECK) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DLPSCHECK=on") +endif() +if(LEGACY) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DLEGACY=on") +endif() +if(NOBLKBUFMEM) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DNOBLKBUFMEM=on") +endif() +if(NOBLKMEM) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DNOBLKMEM=on") +endif() +if(NOBUFMEM) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DNOBUFMEM=on") +endif() +if(DEBUGSOL) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DDEBUGSOL=on") +endif() +if(SANITIZE_ADDRESS) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DSANITIZE_ADDRESS=on") +endif() +if(SANITIZE_MEMORY) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DSANITIZE_MEMORY=on") +endif() +if(SANITIZE_UNDEFINED) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DSANITIZE_UNDEFINED=on") +endif() +if(SANITIZE_THREAD) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DSANITIZE_THREAD=on") +endif() +if(COVERAGE) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DCOVERAGE=on") +endif() +if(MT) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DMT=on") +endif() +if(CXXONLY) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DCXXONLY=on") +endif() +if(TPI STREQUAL "tny") + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DTPI=tny") +elseif(TPI STREQUAL "omp") + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DTPI=omp") +endif() +if(EXPRINT STREQUAL "none") + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DEXPRINT=none") +endif() +if(LPS STREQUAL "spx") + if(SOPLEX_DIR) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DSOPLEX_DIR=${SOPLEX_DIR}") + endif() +elseif(LPS STREQUAL "cpx") + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DLPS=${LPS}") + if(CPLEX_DIR) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DCPLEX_DIR=${CPLEX_DIR}") + endif() +elseif(LPS STREQUAL "glop") + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DLPS=${LPS}") + if(GLOP_DIR) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DGLOP_DIR=${GLOP_DIR}") + endif() +elseif(LPS STREQUAL "grb") + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DLPS=${LPS}") + if(GUROBI_DIR) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DGUROBI_DIR=${GUROBI_DIR}") + endif() +elseif(LPS STREQUAL "qso") + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DLPS=${LPS}") + if(QSO_DIR) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DQSO_DIR=${QSOI_DIR}") + endif() +elseif(LPS STREQUAL "clp") + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DLPS=${LPS}") + if(CLP_DIR) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DCLP_DIR=${CLP_DIR}") + endif() +elseif(LPS STREQUAL "xprs") + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DLPS=${LPS}") + if(XPRESS_DIR) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DXPRESS_DIR=${XPRESS_DIR}") + endif() +elseif(LPS STREQUAL "msk") + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DLPS=${LPS}") + if(MOSEK_DIR) + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DMOSEK_DIR=${MOSEK_DIR}") + endif() +elseif(LPS STREQUAL "highs") + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DLPS=${LPS}") +elseif(LPS STREQUAL "none") + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DLPS=${LPS}") +endif() +if(NOT SYM STREQUAL "sbliss") + file(APPEND ${CMAKE_BINARY_DIR}/cmake.log " -DSYM=${SYM}") +endif() +file(APPEND ${CMAKE_BINARY_DIR}/cmake.log "\n") +message(STATUS "Written file with changed options to ${CMAKE_BINARY_DIR}/cmake.log.") +# --------------------------------------------------------------