I am developing one project and I came up with idea of taking some source files from my old project and use it in my current one. Sounds great.
It is important that these files contain code using Boost library and include Boost headers.
So I have copied the .cpp and .h files and added them to my CMakeLists.txt, so they will be compiled. At this stage I expect my project building to fail, because I didn't set Boost library to be linked with my project.
I expect that there should be "unresolved reference" and such errors. But it links without errors and I don't know why.
I am using format, tokenizer and algorithm/string boost libraries.
My CMakeLists.txt is something like this:
project(UberProject)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Wall")
set(SOURCE_FILES main.cpp
file1.cpp
file2.cpp
newFileWithBoost.cpp
)
add_executable(UberProject ${SOURCE_FILES})