diff --git a/.gitignore b/.gitignore index 77b23213..90d78264 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ a.out* -/build* +/*build* diff --git a/CMakeLists.txt b/CMakeLists.txt index b8d4f569..c6fecd85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,7 @@ add_library(CLI INTERFACE) target_include_directories(CLI INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include") file(GLOB CLI_headers "${CMAKE_CURRENT_SOURCE_DIR}/include/CLI/*") +# To see in IDE, must be listed for target # Single file test option(CLI_SINGLE_FILE "Generate a single header file (and test)" ${CUR_PROJ}) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 3738a8ef..272df665 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,8 +1,8 @@ -add_executable(try try.cpp) +add_executable(try try.cpp ${CLI_headers}) target_link_libraries(try PUBLIC CLI) -add_executable(try1 try1.cpp) +add_executable(try1 try1.cpp ${CLI_headers}) target_link_libraries(try1 PUBLIC CLI) -add_executable(try2 try2.cpp) +add_executable(try2 try2.cpp ${CLI_headers}) target_link_libraries(try2 PUBLIC CLI) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1344175c..67440a2e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -14,7 +14,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}) foreach(T ${CLI_TESTS}) - add_executable(${T} ${T}.cpp) + add_executable(${T} ${T}.cpp ${CLI_headers}) target_link_libraries(${T} PUBLIC CLI) add_gtest(${T})