Commit 81f58c130a325d66fa74c4645d0e368877a11332

Authored by Henry Fredrick Schreiner
1 parent ade78c58

Fixing for IDE builds

.gitignore
1 1 a.out*
2   -/build*
  2 +/*build*
... ...
CMakeLists.txt
... ... @@ -26,6 +26,7 @@ add_library(CLI INTERFACE)
26 26 target_include_directories(CLI INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include")
27 27  
28 28 file(GLOB CLI_headers "${CMAKE_CURRENT_SOURCE_DIR}/include/CLI/*")
  29 +# To see in IDE, must be listed for target
29 30  
30 31 # Single file test
31 32 option(CLI_SINGLE_FILE "Generate a single header file (and test)" ${CUR_PROJ})
... ...
examples/CMakeLists.txt
1   -add_executable(try try.cpp)
  1 +add_executable(try try.cpp ${CLI_headers})
2 2 target_link_libraries(try PUBLIC CLI)
3 3  
4   -add_executable(try1 try1.cpp)
  4 +add_executable(try1 try1.cpp ${CLI_headers})
5 5 target_link_libraries(try1 PUBLIC CLI)
6 6  
7   -add_executable(try2 try2.cpp)
  7 +add_executable(try2 try2.cpp ${CLI_headers})
8 8 target_link_libraries(try2 PUBLIC CLI)
... ...
tests/CMakeLists.txt
... ... @@ -14,7 +14,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
14 14  
15 15 foreach(T ${CLI_TESTS})
16 16  
17   - add_executable(${T} ${T}.cpp)
  17 + add_executable(${T} ${T}.cpp ${CLI_headers})
18 18 target_link_libraries(${T} PUBLIC CLI)
19 19 add_gtest(${T})
20 20  
... ...