From 1ff66fd1f38b1875c5705e603c77950325dafb7e Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Fri, 24 Apr 2020 17:51:19 -0400 Subject: [PATCH] [cmake] Minor cleanings --- CMakeLists.txt | 4 +++- test/c++/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 44d8b6dc..8208e33f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,6 +53,7 @@ endif() if(NOT IS_SUBPROJECT) message(STATUS "-------- CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX} --------") endif() +set(APP4TRIQS_BINARY_DIR ${PROJECT_BINARY_DIR} CACHE STRING "Binary directory of the APP4TRIQS Project") # ############ # Dependencies @@ -73,7 +74,7 @@ endif() set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # Global compiler options -option(BUILD_SHARED_LIBS "Enable compilation of shared libraries" FALSE) +option(BUILD_SHARED_LIBS "Enable compilation of shared libraries" OFF) add_compile_options( $<$:-Og> $<$:-ggdb3> @@ -132,6 +133,7 @@ endif() # Additional configuration files add_subdirectory(share) + # ############# # Debian Package diff --git a/test/c++/CMakeLists.txt b/test/c++/CMakeLists.txt index 15bcdfdb..a8855a5f 100644 --- a/test/c++/CMakeLists.txt +++ b/test/c++/CMakeLists.txt @@ -11,8 +11,8 @@ foreach(test ${all_tests}) get_filename_component(test_name ${test} NAME_WE) get_filename_component(test_dir ${test} DIRECTORY) add_executable(${test_name} ${test}) - set_property(TARGET ${test_name} PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${test_dir}) target_link_libraries(${test_name} app4triqs_c gtest_main project_warnings) + set_property(TARGET ${test_name} PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${test_dir}) add_test(NAME ${test_name} COMMAND ${test_name} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${test_dir}) # Run clang-tidy if found if(CLANG_TIDY_EXECUTABLE)