3
0
mirror of https://github.com/triqs/dft_tools synced 2025-01-03 10:05:49 +01:00

[cmake] Add BUILD_SHARED_LIBS option, continue to build static by default

This commit is contained in:
Nils Wentzell 2020-04-22 15:06:15 -04:00
parent ed5812988f
commit 4120eb5f99
2 changed files with 2 additions and 1 deletions

View File

@ -73,6 +73,7 @@ endif()
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Global compiler options # Global compiler options
option(BUILD_SHARED_LIBS "Enable compilation of shared libraries" FALSE)
add_compile_options( add_compile_options(
$<$<CONFIG:Debug>:-Og> $<$<CONFIG:Debug>:-Og>
$<$<CONFIG:Debug>:-ggdb3> $<$<CONFIG:Debug>:-ggdb3>

View File

@ -1,5 +1,5 @@
file(GLOB_RECURSE sources *.cpp) file(GLOB_RECURSE sources *.cpp)
add_library(app4triqs_c STATIC ${sources}) add_library(app4triqs_c ${sources})
# Link against triqs and enable warnings # Link against triqs and enable warnings
target_link_libraries(app4triqs_c PUBLIC triqs PRIVATE project_warnings) target_link_libraries(app4triqs_c PUBLIC triqs PRIVATE project_warnings)