Skip to content

Commit

Permalink
Rename Cmake options to have QDLDL prefix for namespacing
Browse files Browse the repository at this point in the history
  • Loading branch information
imciner2 committed Apr 20, 2022
1 parent f2665f8 commit 2a4326a
Showing 1 changed file with 10 additions and 6 deletions.
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

0 comments on commit 2a4326a

Please sign in to comment.