3
0
mirror of https://github.com/triqs/dft_tools synced 2024-07-11 13:53:47 +02:00

[cmake] Minor cleanings

This commit is contained in:
Nils Wentzell 2020-04-24 17:51:19 -04:00
parent 3f71381f1b
commit 1ff66fd1f3
2 changed files with 4 additions and 2 deletions

View File

@ -53,6 +53,7 @@ endif()
if(NOT IS_SUBPROJECT) if(NOT IS_SUBPROJECT)
message(STATUS "-------- CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX} --------") message(STATUS "-------- CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX} --------")
endif() endif()
set(APP4TRIQS_BINARY_DIR ${PROJECT_BINARY_DIR} CACHE STRING "Binary directory of the APP4TRIQS Project")
# ############ # ############
# Dependencies # Dependencies
@ -73,7 +74,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) option(BUILD_SHARED_LIBS "Enable compilation of shared libraries" OFF)
add_compile_options( add_compile_options(
$<$<CONFIG:Debug>:-Og> $<$<CONFIG:Debug>:-Og>
$<$<CONFIG:Debug>:-ggdb3> $<$<CONFIG:Debug>:-ggdb3>
@ -132,6 +133,7 @@ endif()
# Additional configuration files # Additional configuration files
add_subdirectory(share) add_subdirectory(share)
# ############# # #############
# Debian Package # Debian Package

View File

@ -11,8 +11,8 @@ foreach(test ${all_tests})
get_filename_component(test_name ${test} NAME_WE) get_filename_component(test_name ${test} NAME_WE)
get_filename_component(test_dir ${test} DIRECTORY) get_filename_component(test_dir ${test} DIRECTORY)
add_executable(${test_name} ${test}) 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) 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}) add_test(NAME ${test_name} COMMAND ${test_name} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${test_dir})
# Run clang-tidy if found # Run clang-tidy if found
if(CLANG_TIDY_EXECUTABLE) if(CLANG_TIDY_EXECUTABLE)