diff options
author | Gereon Kremer <gereon.kremer@cs.rwth-aachen.de> | 2021-04-01 20:20:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-01 18:20:53 +0000 |
commit | 3f4b33522bd04b509b73267550d24c44e61998ce (patch) | |
tree | 8065d0d2c20ec8d4005880d0565589efd3dc210b /src/main | |
parent | 05a53a2ac405bcd18a84024247145f161809c3b0 (diff) |
Refactor CLN dependency & Cleanup (#6251)
This PR migrates CLN to a new Find script and adds the possibility to install CLN if not found in the system.
Also, it does a bit of cleanup.
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/CMakeLists.txt | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/main/CMakeLists.txt b/src/main/CMakeLists.txt index 2d2b08378..fd2d415b2 100644 --- a/src/main/CMakeLists.txt +++ b/src/main/CMakeLists.txt @@ -41,22 +41,20 @@ add_dependencies(main cvc4 cvc4parser gen-tokens) get_target_property(LIBCVC4_INCLUDES cvc4 INCLUDE_DIRECTORIES) target_include_directories(main PRIVATE ${LIBCVC4_INCLUDES}) if(USE_CLN) - target_link_libraries(main ${CLN_LIBRARIES}) - target_include_directories(main PRIVATE $<BUILD_INTERFACE:${CLN_INCLUDE_DIR}>) + target_link_libraries(main PUBLIC CLN) endif() -target_link_libraries(main GMP) +target_link_libraries(main PUBLIC GMP) # main-test library is only used for linking against api and unit tests so # that we don't have to include all object files of main into each api/unit # test. Do not link against main-test in any other case. add_library(main-test driver_unified.cpp $<TARGET_OBJECTS:main>) target_compile_definitions(main-test PRIVATE -D__BUILDING_CVC4DRIVER) -target_link_libraries(main-test cvc4 cvc4parser) +target_link_libraries(main-test PUBLIC cvc4 cvc4parser) if(USE_CLN) - target_link_libraries(main-test ${CLN_LIBRARIES}) - target_include_directories(main-test PRIVATE $<BUILD_INTERFACE:${CLN_INCLUDE_DIR}>) + target_link_libraries(main-test PUBLIC CLN) endif() -target_link_libraries(main-test GMP) +target_link_libraries(main-test PUBLIC GMP) #-----------------------------------------------------------------------------# # cvc4 binary configuration @@ -67,12 +65,11 @@ set_target_properties(cvc4-bin PROPERTIES OUTPUT_NAME cvc4 RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) -target_link_libraries(cvc4-bin cvc4 cvc4parser) +target_link_libraries(cvc4-bin PUBLIC cvc4 cvc4parser) if(USE_CLN) - target_link_libraries(cvc4-bin ${CLN_LIBRARIES}) - target_include_directories(cvc4-bin PRIVATE $<BUILD_INTERFACE:${CLN_INCLUDE_DIR}>) + target_link_libraries(cvc4-bin PUBLIC CLN) endif() -target_link_libraries(cvc4-bin GMP) +target_link_libraries(cvc4-bin PUBLIC GMP) if(PROGRAM_PREFIX) install(PROGRAMS $<TARGET_FILE:cvc4-bin> @@ -94,9 +91,9 @@ if(ENABLE_STATIC_BINARY) endif() if(USE_EDITLINE) - target_link_libraries(cvc4-bin ${Editline_LIBRARIES}) - target_link_libraries(main-test ${Editline_LIBRARIES}) - target_include_directories(main PRIVATE ${Editline_INCLUDE_DIRS}) + target_link_libraries(cvc4-bin PUBLIC ${Editline_LIBRARIES}) + target_link_libraries(main-test PUBLIC ${Editline_LIBRARIES}) + target_include_directories(main PUBLIC ${Editline_INCLUDE_DIRS}) endif() #-----------------------------------------------------------------------------# |