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

Rename Cmake options to have QDLDL prefix for namespacing #45

Merged
merged 2 commits into from
Jun 20, 2022
Merged
Changes from 1 commit
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
16 changes: 10 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,21 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Options
# ----------------------------------------------
# Use floats instead of doubles
option( DFLOAT "Use float numbers instead of doubles" OFF )
message(STATUS "Floats are ${DFLOAT}")
option( QDLDL_FLOAT "Use float numbers instead of doubles" OFF )
if( ${QDLDL_FLOAT} )
message( STATUS "Using single precision floats" )
else()
message( STATUS "Using double precision floats" )
endif()

# Use long integers for indexing
option( DLONG "Use long integers (64bit) for indexing" ON )
option( QDLDL_LONG "Use long integers (64bit) for indexing" ON )

if( NOT (CMAKE_SIZEOF_VOID_P EQUAL 8) )
message(STATUS "Disabling long integers (64bit) on 32bit machine")
set(DLONG OFF)
endif()
message(STATUS "Long integers (64bit) are ${DLONG}")
message(STATUS "Long integers (64bit) are ${QDLDL_LONG}")


# Set Compiler flags
Expand All @@ -74,14 +78,14 @@ endif (NOT MSVC)
# ---------------------------------------------

# numeric types
if(DFLOAT)
if(QDLDL_FLOAT)
set(QDLDL_FLOAT_TYPE "float")
set(QDLDL_FLOAT 1)
else()
set(QDLDL_FLOAT_TYPE "double")
endif()

if(DLONG)
if(QDLDL_LONG)
set(QDLDL_INT_TYPE "long long")
set(QDLDL_INT_TYPE_MAX "LLONG_MAX")
set(QDLDL_LONG 1)
Expand Down