Skip to content

Commit

Permalink
clean up cmake config for klu
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas Schroeder <jonas.schroeder1@rwth-aachen.de>
  • Loading branch information
JTS22 committed Jul 13, 2023
1 parent 81cf379 commit 5240326
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 16 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ set(PROJECT_VCS_URL "https://github.com/sogno-platform/dpsim")
if(POLICY CMP0076)
cmake_policy(SET CMP0076 NEW)
endif()

# Solve DOWNLOAD_EXTRACT_TIMESTAMP warning
if(POLICY CMP0135)
cmake_policy(SET CMP0135 NEW)
endif()

# Allow setting Graphviz_ROOT for windows builds
if(WIN32)
cmake_policy(SET CMP0074 NEW)
Expand Down
1 change: 0 additions & 1 deletion dpsim-models/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ set(MODELS_LIBRARIES
Threads::Threads
Eigen3::Eigen
spdlog::spdlog
klu
)

add_subdirectory(src)
5 changes: 0 additions & 5 deletions dpsim-models/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,6 @@ if(WITH_GSL)
list(APPEND MODELS_LIBRARIES ${GSL_LIBRARIES})
endif()

if(WITH_KLU)
list(APPEND MODELS_INCLUDE_DIRS ${KLU_INCLUDE_DIRS})
list(APPEND MODELS_LIBRARIES ${KLU_LIBRARIES})
endif()

target_link_libraries(dpsim-models PUBLIC ${MODELS_LIBRARIES})
target_include_directories(dpsim-models PUBLIC ${MODELS_INCLUDE_DIRS})
target_sources(dpsim-models PRIVATE ${MODELS_SOURCES})
Expand Down
10 changes: 0 additions & 10 deletions dpsim/examples/cxx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -214,21 +214,11 @@ if(WITH_CIM)
endif()
endif()

if(WITH_PYBIND)
#list(APPEND LIBRARIES ${PYTHON_LIBRARIES})
list(APPEND INCLUDE_DIRS ${Python_INCLUDE_DIRS})
endif()

if(WITH_OPENMP)
list(APPEND DPSIM_CXX_FLAGS ${OpenMP_CXX_FLAGS})
list(APPEND LIBRARIES ${OpenMP_CXX_FLAGS})
endif()

if(WITH_KLU)
list(APPEND INCLUDE_DIRS ${KLU_INCLUDE_DIR})
list(APPEND LIBRARIES ${KLU_LIBRARIES})
endif()

add_custom_target(tests)

foreach(SOURCE ${CIRCUIT_SOURCES} ${SYNCGEN_SOURCES} ${VARFREQ_SOURCES} ${RT_SOURCES} ${CIM_SOURCES} ${CIM_SOURCES_POSIX} ${DAE_SOURCES} ${INVERTER_SOURCES})
Expand Down
1 change: 1 addition & 0 deletions dpsim/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ if(WITH_JSON)
endif()

if(WITH_KLU)
list(APPEND DPSIM_LIBRARIES klu)
list(APPEND DPSIM_SOURCES
KLUAdapter.cpp
)
Expand Down

0 comments on commit 5240326

Please sign in to comment.