From b6cedfb0dfdc1f488f7040ab107dd3072bc1d77e Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Wed, 10 Jun 2020 16:46:16 -0400 Subject: [PATCH 1/4] [cmake] Provide a namespaced alias to the PROJECT_NAME_warnings target --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e42c001e..6d148331 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -100,6 +100,7 @@ add_compile_options( # Create an Interface target for compiler warnings add_library(${PROJECT_NAME}_warnings INTERFACE) +add_library(${PROJECT_NAME}::${PROJECT_NAME}_warnings ALIAS ${PROJECT_NAME}_warnings) target_compile_options(${PROJECT_NAME}_warnings INTERFACE -Wall From 612f9b8076ef6a36328b11e81fc405aa2b405e05 Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Wed, 10 Jun 2020 16:46:58 -0400 Subject: [PATCH 2/4] [doc] Use https over http in intersphinx_mapping --- doc/conf.py.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/conf.py.in b/doc/conf.py.in index 977f4218..7662c9ba 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -42,4 +42,4 @@ html_sidebars = {'index': ['sideb.html', 'searchbox.html']} htmlhelp_basename = '@PROJECT_NAME@doc' -intersphinx_mapping = {'python': ('http://docs.python.org/3.8', None), 'triqslibs': ('https://triqs.github.io/triqs/latest', None)} +intersphinx_mapping = {'python': ('https://docs.python.org/3.8', None), 'triqslibs': ('https://triqs.github.io/triqs/latest', None)} From 354f1420c1c4c5bf6c848a3a867fb673f3aa7389 Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Wed, 10 Jun 2020 16:47:19 -0400 Subject: [PATCH 3/4] [doc] Minor fix in install instructions --- doc/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/install.rst b/doc/install.rst index 08b85434..203ab7cd 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -65,7 +65,7 @@ Custom CMake options The compilation of ``app4triqs`` can be configured using CMake-options:: - cmake ../app4triqs.src -DOPTION1=value1 -DOPTION2=value2 ... ../app4triqs.src + cmake ../app4triqs.src -DOPTION1=value1 -DOPTION2=value2 ... +-----------------------------------------------------------------+-----------------------------------------------+ | Options | Syntax | From 5156e45b5bc5a396f688333f84e2c90f05c9eb13 Mon Sep 17 00:00:00 2001 From: Nils Wentzell Date: Wed, 10 Jun 2020 16:53:25 -0400 Subject: [PATCH 4/4] [cmake] Make sure to use namespaced targets in c++ test dir --- CMakeLists.txt | 1 - test/c++/CMakeLists.txt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d148331..e42c001e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -100,7 +100,6 @@ add_compile_options( # Create an Interface target for compiler warnings add_library(${PROJECT_NAME}_warnings INTERFACE) -add_library(${PROJECT_NAME}::${PROJECT_NAME}_warnings ALIAS ${PROJECT_NAME}_warnings) target_compile_options(${PROJECT_NAME}_warnings INTERFACE -Wall diff --git a/test/c++/CMakeLists.txt b/test/c++/CMakeLists.txt index 071b5fd2..36466c39 100644 --- a/test/c++/CMakeLists.txt +++ b/test/c++/CMakeLists.txt @@ -11,7 +11,7 @@ foreach(test ${all_tests}) get_filename_component(test_name ${test} NAME_WE) get_filename_component(test_dir ${test} DIRECTORY) add_executable(${test_name} ${test}) - target_link_libraries(${test_name} ${PROJECT_NAME}_c gtest_main ${PROJECT_NAME}_warnings) + target_link_libraries(${test_name} ${PROJECT_NAME}::${PROJECT_NAME}_c ${PROJECT_NAME}_warnings gtest_main) 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